ossl_err_load_ASN1_strings:
  210|      2|{
  211|      2|#ifndef OPENSSL_NO_ERR
  212|      2|    if (ERR_reason_error_string(ASN1_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (212:9): [True: 2, False: 0]
  ------------------
  213|      2|        ERR_load_strings_const(ASN1_str_reasons);
  214|      2|#endif
  215|      2|    return 1;
  216|      2|}

async_local_init:
   28|      2|{
   29|      2|    async_mem_lock = CRYPTO_THREAD_lock_new();
   30|      2|    return async_mem_lock != NULL;
   31|      2|}
async_local_deinit:
   34|      2|{
   35|      2|    CRYPTO_THREAD_lock_free(async_mem_lock);
   36|      2|}

async_init:
  329|      2|{
  330|      2|    if (!CRYPTO_THREAD_init_local(&ctxkey, NULL))
  ------------------
  |  Branch (330:9): [True: 0, False: 2]
  ------------------
  331|      0|        return 0;
  332|       |
  333|      2|    if (!CRYPTO_THREAD_init_local(&poolkey, NULL)) {
  ------------------
  |  Branch (333:9): [True: 0, False: 2]
  ------------------
  334|      0|        CRYPTO_THREAD_cleanup_local(&ctxkey);
  335|      0|        return 0;
  336|      0|    }
  337|       |
  338|      2|    return async_local_init();
  339|      2|}
async_deinit:
  342|      2|{
  343|      2|    CRYPTO_THREAD_cleanup_local(&ctxkey);
  344|      2|    CRYPTO_THREAD_cleanup_local(&poolkey);
  345|      2|    async_local_deinit();
  346|      2|}

ossl_err_load_ASYNC_strings:
   31|      2|{
   32|      2|#ifndef OPENSSL_NO_ERR
   33|      2|    if (ERR_reason_error_string(ASYNC_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (33:9): [True: 2, False: 0]
  ------------------
   34|      2|        ERR_load_strings_const(ASYNC_str_reasons);
   35|      2|#endif
   36|      2|    return 1;
   37|      2|}

ossl_err_load_BIO_strings:
   93|      2|{
   94|      2|#ifndef OPENSSL_NO_ERR
   95|      2|    if (ERR_reason_error_string(BIO_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (95:9): [True: 2, False: 0]
  ------------------
   96|      2|        ERR_load_strings_const(BIO_str_reasons);
   97|      2|#endif
   98|      2|    return 1;
   99|      2|}

bio_cleanup:
  947|      2|{
  948|      2|#ifndef OPENSSL_NO_SOCK
  949|      2|    bio_sock_cleanup_int();
  950|      2|    CRYPTO_THREAD_lock_free(bio_lookup_lock);
  951|      2|    bio_lookup_lock = NULL;
  952|      2|#endif
  953|      2|    CRYPTO_FREE_REF(&bio_type_count);
  954|      2|}

BIO_snprintf:
  925|      2|{
  926|      2|    va_list args;
  927|      2|    int ret;
  928|       |
  929|      2|    va_start(args, format);
  930|       |
  931|      2|    ret = BIO_vsnprintf(buf, n, format, args);
  932|       |
  933|      2|    va_end(args);
  934|      2|    return ret;
  935|      2|}
BIO_vsnprintf:
  938|      4|{
  939|      4|    size_t retlen;
  940|      4|    int truncated;
  941|       |
  942|      4|    if (!_dopr(&buf, NULL, &n, &retlen, &truncated, format, args))
  ------------------
  |  Branch (942:9): [True: 0, False: 4]
  ------------------
  943|      0|        return -1;
  944|       |
  945|      4|    if (truncated)
  ------------------
  |  Branch (945:9): [True: 0, False: 4]
  ------------------
  946|       |        /*
  947|       |         * In case of truncation, return -1 like traditional snprintf.
  948|       |         * (Current drafts for ISO/IEC 9899 say snprintf should return the
  949|       |         * number of characters that would have been written, had the buffer
  950|       |         * been large enough.)
  951|       |         */
  952|      0|        return -1;
  953|      4|    return (retlen <= INT_MAX) ? (int)retlen : -1;
  ------------------
  |  Branch (953:12): [True: 4, False: 0]
  ------------------
  954|      4|}
bio_print.c:_dopr:
   91|      4|{
   92|      4|    char ch;
   93|      4|    int64_t value;
   94|      4|#ifndef OPENSSL_SYS_UEFI
   95|      4|    LDOUBLE fvalue;
  ------------------
  |  |   28|      4|# define LDOUBLE double
  ------------------
   96|      4|#endif
   97|      4|    char *strvalue;
   98|      4|    int min;
   99|      4|    int max;
  100|      4|    int state;
  101|      4|    int flags;
  102|      4|    int cflags;
  103|      4|    size_t currlen;
  104|       |
  105|      4|    state = DP_S_DEFAULT;
  ------------------
  |  |   45|      4|#define DP_S_DEFAULT    0
  ------------------
  106|      4|    flags = currlen = cflags = min = 0;
  107|      4|    max = -1;
  108|      4|    ch = *format++;
  109|       |
  110|    102|    while (state != DP_S_DONE) {
  ------------------
  |  |   52|    102|#define DP_S_DONE       7
  ------------------
  |  Branch (110:12): [True: 98, False: 4]
  ------------------
  111|     98|        if (ch == '\0' || (buffer == NULL && currlen >= *maxlen))
  ------------------
  |  Branch (111:13): [True: 4, False: 94]
  |  Branch (111:28): [True: 94, False: 0]
  |  Branch (111:46): [True: 0, False: 94]
  ------------------
  112|      4|            state = DP_S_DONE;
  ------------------
  |  |   52|      4|#define DP_S_DONE       7
  ------------------
  113|       |
  114|     98|        switch (state) {
  115|     44|        case DP_S_DEFAULT:
  ------------------
  |  |   45|     44|#define DP_S_DEFAULT    0
  ------------------
  |  Branch (115:9): [True: 44, False: 54]
  ------------------
  116|     44|            if (ch == '%')
  ------------------
  |  Branch (116:17): [True: 10, False: 34]
  ------------------
  117|     10|                state = DP_S_FLAGS;
  ------------------
  |  |   46|     10|#define DP_S_FLAGS      1
  ------------------
  118|     34|            else
  119|     34|                if (!doapr_outch(sbuffer, buffer, &currlen, maxlen, ch))
  ------------------
  |  Branch (119:21): [True: 0, False: 34]
  ------------------
  120|      0|                    return 0;
  121|     44|            ch = *format++;
  122|     44|            break;
  123|     10|        case DP_S_FLAGS:
  ------------------
  |  |   46|     10|#define DP_S_FLAGS      1
  ------------------
  |  Branch (123:9): [True: 10, False: 88]
  ------------------
  124|     10|            switch (ch) {
  125|      0|            case '-':
  ------------------
  |  Branch (125:13): [True: 0, False: 10]
  ------------------
  126|      0|                flags |= DP_F_MINUS;
  ------------------
  |  |   56|      0|#define DP_F_MINUS      (1 << 0)
  ------------------
  127|      0|                ch = *format++;
  128|      0|                break;
  129|      0|            case '+':
  ------------------
  |  Branch (129:13): [True: 0, False: 10]
  ------------------
  130|      0|                flags |= DP_F_PLUS;
  ------------------
  |  |   58|      0|#define DP_F_PLUS       (1 << 1)
  ------------------
  131|      0|                ch = *format++;
  132|      0|                break;
  133|      0|            case ' ':
  ------------------
  |  Branch (133:13): [True: 0, False: 10]
  ------------------
  134|      0|                flags |= DP_F_SPACE;
  ------------------
  |  |   60|      0|#define DP_F_SPACE      (1 << 2)
  ------------------
  135|      0|                ch = *format++;
  136|      0|                break;
  137|      0|            case '#':
  ------------------
  |  Branch (137:13): [True: 0, False: 10]
  ------------------
  138|      0|                flags |= DP_F_NUM;
  ------------------
  |  |   62|      0|#define DP_F_NUM        (1 << 3)
  ------------------
  139|      0|                ch = *format++;
  140|      0|                break;
  141|      0|            case '0':
  ------------------
  |  Branch (141:13): [True: 0, False: 10]
  ------------------
  142|      0|                flags |= DP_F_ZERO;
  ------------------
  |  |   64|      0|#define DP_F_ZERO       (1 << 4)
  ------------------
  143|      0|                ch = *format++;
  144|      0|                break;
  145|     10|            default:
  ------------------
  |  Branch (145:13): [True: 10, False: 0]
  ------------------
  146|     10|                state = DP_S_MIN;
  ------------------
  |  |   47|     10|#define DP_S_MIN        2
  ------------------
  147|     10|                break;
  148|     10|            }
  149|     10|            break;
  150|     10|        case DP_S_MIN:
  ------------------
  |  |   47|     10|#define DP_S_MIN        2
  ------------------
  |  Branch (150:9): [True: 10, False: 88]
  ------------------
  151|     10|            if (ossl_isdigit(ch)) {
  ------------------
  |  Branch (151:17): [True: 0, False: 10]
  ------------------
  152|      0|                min = 10 * min + char_to_int(ch);
  ------------------
  |  |   83|      0|#define char_to_int(p) (p - '0')
  ------------------
  153|      0|                ch = *format++;
  154|     10|            } else if (ch == '*') {
  ------------------
  |  Branch (154:24): [True: 0, False: 10]
  ------------------
  155|      0|                min = va_arg(args, int);
  156|      0|                ch = *format++;
  157|      0|                state = DP_S_DOT;
  ------------------
  |  |   48|      0|#define DP_S_DOT        3
  ------------------
  158|      0|            } else
  159|     10|                state = DP_S_DOT;
  ------------------
  |  |   48|     10|#define DP_S_DOT        3
  ------------------
  160|     10|            break;
  161|     10|        case DP_S_DOT:
  ------------------
  |  |   48|     10|#define DP_S_DOT        3
  ------------------
  |  Branch (161:9): [True: 10, False: 88]
  ------------------
  162|     10|            if (ch == '.') {
  ------------------
  |  Branch (162:17): [True: 0, False: 10]
  ------------------
  163|      0|                state = DP_S_MAX;
  ------------------
  |  |   49|      0|#define DP_S_MAX        4
  ------------------
  164|      0|                ch = *format++;
  165|      0|            } else
  166|     10|                state = DP_S_MOD;
  ------------------
  |  |   50|     10|#define DP_S_MOD        5
  ------------------
  167|     10|            break;
  168|      0|        case DP_S_MAX:
  ------------------
  |  |   49|      0|#define DP_S_MAX        4
  ------------------
  |  Branch (168:9): [True: 0, False: 98]
  ------------------
  169|      0|            if (ossl_isdigit(ch)) {
  ------------------
  |  Branch (169:17): [True: 0, False: 0]
  ------------------
  170|      0|                if (max < 0)
  ------------------
  |  Branch (170:21): [True: 0, False: 0]
  ------------------
  171|      0|                    max = 0;
  172|      0|                max = 10 * max + char_to_int(ch);
  ------------------
  |  |   83|      0|#define char_to_int(p) (p - '0')
  ------------------
  173|      0|                ch = *format++;
  174|      0|            } else if (ch == '*') {
  ------------------
  |  Branch (174:24): [True: 0, False: 0]
  ------------------
  175|      0|                max = va_arg(args, int);
  176|      0|                ch = *format++;
  177|      0|                state = DP_S_MOD;
  ------------------
  |  |   50|      0|#define DP_S_MOD        5
  ------------------
  178|      0|            } else
  179|      0|                state = DP_S_MOD;
  ------------------
  |  |   50|      0|#define DP_S_MOD        5
  ------------------
  180|      0|            break;
  181|     10|        case DP_S_MOD:
  ------------------
  |  |   50|     10|#define DP_S_MOD        5
  ------------------
  |  Branch (181:9): [True: 10, False: 88]
  ------------------
  182|     10|            switch (ch) {
  183|      0|            case 'h':
  ------------------
  |  Branch (183:13): [True: 0, False: 10]
  ------------------
  184|      0|                cflags = DP_C_SHORT;
  ------------------
  |  |   71|      0|#define DP_C_SHORT      1
  ------------------
  185|      0|                ch = *format++;
  186|      0|                break;
  187|      0|            case 'l':
  ------------------
  |  Branch (187:13): [True: 0, False: 10]
  ------------------
  188|      0|                if (*format == 'l') {
  ------------------
  |  Branch (188:21): [True: 0, False: 0]
  ------------------
  189|      0|                    cflags = DP_C_LLONG;
  ------------------
  |  |   74|      0|#define DP_C_LLONG      4
  ------------------
  190|      0|                    format++;
  191|      0|                } else
  192|      0|                    cflags = DP_C_LONG;
  ------------------
  |  |   72|      0|#define DP_C_LONG       2
  ------------------
  193|      0|                ch = *format++;
  194|      0|                break;
  195|      0|            case 'q':
  ------------------
  |  Branch (195:13): [True: 0, False: 10]
  ------------------
  196|      0|            case 'j':
  ------------------
  |  Branch (196:13): [True: 0, False: 10]
  ------------------
  197|      0|                cflags = DP_C_LLONG;
  ------------------
  |  |   74|      0|#define DP_C_LLONG      4
  ------------------
  198|      0|                ch = *format++;
  199|      0|                break;
  200|      0|            case 'L':
  ------------------
  |  Branch (200:13): [True: 0, False: 10]
  ------------------
  201|      0|                cflags = DP_C_LDOUBLE;
  ------------------
  |  |   73|      0|#define DP_C_LDOUBLE    3
  ------------------
  202|      0|                ch = *format++;
  203|      0|                break;
  204|      0|            case 'z':
  ------------------
  |  Branch (204:13): [True: 0, False: 10]
  ------------------
  205|      0|                cflags = DP_C_SIZE;
  ------------------
  |  |   75|      0|#define DP_C_SIZE       5
  ------------------
  206|      0|                ch = *format++;
  207|      0|                break;
  208|     10|            default:
  ------------------
  |  Branch (208:13): [True: 10, False: 0]
  ------------------
  209|     10|                break;
  210|     10|            }
  211|     10|            state = DP_S_CONV;
  ------------------
  |  |   51|     10|#define DP_S_CONV       6
  ------------------
  212|     10|            break;
  213|     10|        case DP_S_CONV:
  ------------------
  |  |   51|     10|#define DP_S_CONV       6
  ------------------
  |  Branch (213:9): [True: 10, False: 88]
  ------------------
  214|     10|            switch (ch) {
  215|      0|            case 'd':
  ------------------
  |  Branch (215:13): [True: 0, False: 10]
  ------------------
  216|      0|            case 'i':
  ------------------
  |  Branch (216:13): [True: 0, False: 10]
  ------------------
  217|      0|                switch (cflags) {
  218|      0|                case DP_C_SHORT:
  ------------------
  |  |   71|      0|#define DP_C_SHORT      1
  ------------------
  |  Branch (218:17): [True: 0, False: 0]
  ------------------
  219|      0|                    value = (short int)va_arg(args, int);
  220|      0|                    break;
  221|      0|                case DP_C_LONG:
  ------------------
  |  |   72|      0|#define DP_C_LONG       2
  ------------------
  |  Branch (221:17): [True: 0, False: 0]
  ------------------
  222|      0|                    value = va_arg(args, long int);
  223|      0|                    break;
  224|      0|                case DP_C_LLONG:
  ------------------
  |  |   74|      0|#define DP_C_LLONG      4
  ------------------
  |  Branch (224:17): [True: 0, False: 0]
  ------------------
  225|      0|                    value = va_arg(args, int64_t);
  226|      0|                    break;
  227|      0|                case DP_C_SIZE:
  ------------------
  |  |   75|      0|#define DP_C_SIZE       5
  ------------------
  |  Branch (227:17): [True: 0, False: 0]
  ------------------
  228|      0|                    value = va_arg(args, ossl_ssize_t);
  229|      0|                    break;
  230|      0|                default:
  ------------------
  |  Branch (230:17): [True: 0, False: 0]
  ------------------
  231|      0|                    value = va_arg(args, int);
  232|      0|                    break;
  233|      0|                }
  234|      0|                if (!fmtint(sbuffer, buffer, &currlen, maxlen, value, 10, min,
  ------------------
  |  Branch (234:21): [True: 0, False: 0]
  ------------------
  235|      0|                            max, flags))
  236|      0|                    return 0;
  237|      0|                break;
  238|      0|            case 'X':
  ------------------
  |  Branch (238:13): [True: 0, False: 10]
  ------------------
  239|      0|                flags |= DP_F_UP;
  ------------------
  |  |   66|      0|#define DP_F_UP         (1 << 5)
  ------------------
  240|       |                /* FALLTHROUGH */
  241|      0|            case 'x':
  ------------------
  |  Branch (241:13): [True: 0, False: 10]
  ------------------
  242|      0|            case 'o':
  ------------------
  |  Branch (242:13): [True: 0, False: 10]
  ------------------
  243|      0|            case 'u':
  ------------------
  |  Branch (243:13): [True: 0, False: 10]
  ------------------
  244|      0|                flags |= DP_F_UNSIGNED;
  ------------------
  |  |   68|      0|#define DP_F_UNSIGNED   (1 << 6)
  ------------------
  245|      0|                switch (cflags) {
  246|      0|                case DP_C_SHORT:
  ------------------
  |  |   71|      0|#define DP_C_SHORT      1
  ------------------
  |  Branch (246:17): [True: 0, False: 0]
  ------------------
  247|      0|                    value = (unsigned short int)va_arg(args, unsigned int);
  248|      0|                    break;
  249|      0|                case DP_C_LONG:
  ------------------
  |  |   72|      0|#define DP_C_LONG       2
  ------------------
  |  Branch (249:17): [True: 0, False: 0]
  ------------------
  250|      0|                    value = va_arg(args, unsigned long int);
  251|      0|                    break;
  252|      0|                case DP_C_LLONG:
  ------------------
  |  |   74|      0|#define DP_C_LLONG      4
  ------------------
  |  Branch (252:17): [True: 0, False: 0]
  ------------------
  253|      0|                    value = va_arg(args, uint64_t);
  254|      0|                    break;
  255|      0|                case DP_C_SIZE:
  ------------------
  |  |   75|      0|#define DP_C_SIZE       5
  ------------------
  |  Branch (255:17): [True: 0, False: 0]
  ------------------
  256|      0|                    value = va_arg(args, size_t);
  257|      0|                    break;
  258|      0|                default:
  ------------------
  |  Branch (258:17): [True: 0, False: 0]
  ------------------
  259|      0|                    value = va_arg(args, unsigned int);
  260|      0|                    break;
  261|      0|                }
  262|      0|                if (!fmtint(sbuffer, buffer, &currlen, maxlen, value,
  ------------------
  |  Branch (262:21): [True: 0, False: 0]
  ------------------
  263|      0|                            ch == 'o' ? 8 : (ch == 'u' ? 10 : 16),
  ------------------
  |  Branch (263:29): [True: 0, False: 0]
  |  Branch (263:46): [True: 0, False: 0]
  ------------------
  264|      0|                            min, max, flags))
  265|      0|                    return 0;
  266|      0|                break;
  267|      0|#ifndef OPENSSL_SYS_UEFI
  268|      0|            case 'f':
  ------------------
  |  Branch (268:13): [True: 0, False: 10]
  ------------------
  269|      0|                if (cflags == DP_C_LDOUBLE)
  ------------------
  |  |   73|      0|#define DP_C_LDOUBLE    3
  ------------------
  |  Branch (269:21): [True: 0, False: 0]
  ------------------
  270|      0|                    fvalue = va_arg(args, LDOUBLE);
  271|      0|                else
  272|      0|                    fvalue = va_arg(args, double);
  273|      0|                if (!fmtfp(sbuffer, buffer, &currlen, maxlen, fvalue, min, max,
  ------------------
  |  Branch (273:21): [True: 0, False: 0]
  ------------------
  274|      0|                           flags, F_FORMAT))
  ------------------
  |  |   78|      0|#define F_FORMAT        0
  ------------------
  275|      0|                    return 0;
  276|      0|                break;
  277|      0|            case 'E':
  ------------------
  |  Branch (277:13): [True: 0, False: 10]
  ------------------
  278|      0|                flags |= DP_F_UP;
  ------------------
  |  |   66|      0|#define DP_F_UP         (1 << 5)
  ------------------
  279|       |                /* fall through */
  280|      0|            case 'e':
  ------------------
  |  Branch (280:13): [True: 0, False: 10]
  ------------------
  281|      0|                if (cflags == DP_C_LDOUBLE)
  ------------------
  |  |   73|      0|#define DP_C_LDOUBLE    3
  ------------------
  |  Branch (281:21): [True: 0, False: 0]
  ------------------
  282|      0|                    fvalue = va_arg(args, LDOUBLE);
  283|      0|                else
  284|      0|                    fvalue = va_arg(args, double);
  285|      0|                if (!fmtfp(sbuffer, buffer, &currlen, maxlen, fvalue, min, max,
  ------------------
  |  Branch (285:21): [True: 0, False: 0]
  ------------------
  286|      0|                           flags, E_FORMAT))
  ------------------
  |  |   79|      0|#define E_FORMAT        1
  ------------------
  287|      0|                    return 0;
  288|      0|                break;
  289|      0|            case 'G':
  ------------------
  |  Branch (289:13): [True: 0, False: 10]
  ------------------
  290|      0|                flags |= DP_F_UP;
  ------------------
  |  |   66|      0|#define DP_F_UP         (1 << 5)
  ------------------
  291|       |                /* fall through */
  292|      0|            case 'g':
  ------------------
  |  Branch (292:13): [True: 0, False: 10]
  ------------------
  293|      0|                if (cflags == DP_C_LDOUBLE)
  ------------------
  |  |   73|      0|#define DP_C_LDOUBLE    3
  ------------------
  |  Branch (293:21): [True: 0, False: 0]
  ------------------
  294|      0|                    fvalue = va_arg(args, LDOUBLE);
  295|      0|                else
  296|      0|                    fvalue = va_arg(args, double);
  297|      0|                if (!fmtfp(sbuffer, buffer, &currlen, maxlen, fvalue, min, max,
  ------------------
  |  Branch (297:21): [True: 0, False: 0]
  ------------------
  298|      0|                           flags, G_FORMAT))
  ------------------
  |  |   80|      0|#define G_FORMAT        2
  ------------------
  299|      0|                    return 0;
  300|      0|                break;
  301|       |#else
  302|       |            case 'f':
  303|       |            case 'E':
  304|       |            case 'e':
  305|       |            case 'G':
  306|       |            case 'g':
  307|       |                /* not implemented for UEFI */
  308|       |                ERR_raise(ERR_LIB_BIO, ERR_R_UNSUPPORTED);
  309|       |                return 0;
  310|       |#endif
  311|      0|            case 'c':
  ------------------
  |  Branch (311:13): [True: 0, False: 10]
  ------------------
  312|      0|                if (!doapr_outch(sbuffer, buffer, &currlen, maxlen,
  ------------------
  |  Branch (312:21): [True: 0, False: 0]
  ------------------
  313|      0|                                 va_arg(args, int)))
  314|      0|                    return 0;
  315|      0|                break;
  316|     10|            case 's':
  ------------------
  |  Branch (316:13): [True: 10, False: 0]
  ------------------
  317|     10|                strvalue = va_arg(args, char *);
  318|     10|                if (max < 0) {
  ------------------
  |  Branch (318:21): [True: 10, False: 0]
  ------------------
  319|     10|                    if (buffer)
  ------------------
  |  Branch (319:25): [True: 0, False: 10]
  ------------------
  320|      0|                        max = INT_MAX;
  321|     10|                    else
  322|     10|                        max = *maxlen;
  323|     10|                }
  324|     10|                if (!fmtstr(sbuffer, buffer, &currlen, maxlen, strvalue,
  ------------------
  |  Branch (324:21): [True: 0, False: 10]
  ------------------
  325|     10|                            flags, min, max))
  326|      0|                    return 0;
  327|     10|                break;
  328|     10|            case 'p':
  ------------------
  |  Branch (328:13): [True: 0, False: 10]
  ------------------
  329|      0|                value = (size_t)va_arg(args, void *);
  330|      0|                if (!fmtint(sbuffer, buffer, &currlen, maxlen,
  ------------------
  |  Branch (330:21): [True: 0, False: 0]
  ------------------
  331|      0|                            value, 16, min, max, flags | DP_F_NUM))
  ------------------
  |  |   62|      0|#define DP_F_NUM        (1 << 3)
  ------------------
  332|      0|                    return 0;
  333|      0|                break;
  334|      0|            case 'n':
  ------------------
  |  Branch (334:13): [True: 0, False: 10]
  ------------------
  335|      0|                {
  336|      0|                    int *num;
  337|      0|                    num = va_arg(args, int *);
  338|      0|                    *num = currlen;
  339|      0|                }
  340|      0|                break;
  341|      0|            case '%':
  ------------------
  |  Branch (341:13): [True: 0, False: 10]
  ------------------
  342|      0|                if (!doapr_outch(sbuffer, buffer, &currlen, maxlen, ch))
  ------------------
  |  Branch (342:21): [True: 0, False: 0]
  ------------------
  343|      0|                    return 0;
  344|      0|                break;
  345|      0|            case 'w':
  ------------------
  |  Branch (345:13): [True: 0, False: 10]
  ------------------
  346|       |                /* not supported yet, treat as next char */
  347|      0|                format++;
  348|      0|                break;
  349|      0|            default:
  ------------------
  |  Branch (349:13): [True: 0, False: 10]
  ------------------
  350|       |                /* unknown, skip */
  351|      0|                break;
  352|     10|            }
  353|     10|            ch = *format++;
  354|     10|            state = DP_S_DEFAULT;
  ------------------
  |  |   45|     10|#define DP_S_DEFAULT    0
  ------------------
  355|     10|            flags = cflags = min = 0;
  356|     10|            max = -1;
  357|     10|            break;
  358|      4|        case DP_S_DONE:
  ------------------
  |  |   52|      4|#define DP_S_DONE       7
  ------------------
  |  Branch (358:9): [True: 4, False: 94]
  ------------------
  359|      4|            break;
  360|      0|        default:
  ------------------
  |  Branch (360:9): [True: 0, False: 98]
  ------------------
  361|      0|            break;
  362|     98|        }
  363|     98|    }
  364|       |    /*
  365|       |     * We have to truncate if there is no dynamic buffer and we have filled the
  366|       |     * static buffer.
  367|       |     */
  368|      4|    if (buffer == NULL) {
  ------------------
  |  Branch (368:9): [True: 4, False: 0]
  ------------------
  369|      4|        *truncated = (currlen > *maxlen - 1);
  370|      4|        if (*truncated)
  ------------------
  |  Branch (370:13): [True: 0, False: 4]
  ------------------
  371|      0|            currlen = *maxlen - 1;
  372|      4|    }
  373|      4|    if (!doapr_outch(sbuffer, buffer, &currlen, maxlen, '\0'))
  ------------------
  |  Branch (373:9): [True: 0, False: 4]
  ------------------
  374|      0|        return 0;
  375|      4|    *retlen = currlen - 1;
  376|      4|    return 1;
  377|      4|}
bio_print.c:doapr_outch:
  833|    146|{
  834|       |    /* If we haven't at least one buffer, someone has done a big booboo */
  835|    146|    if (!ossl_assert(*sbuffer != NULL || buffer != NULL))
  ------------------
  |  |   52|    146|#  define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: "#x, \
  |  |  ------------------
  |  |  |  Branch (52:43): [True: 146, False: 0]
  |  |  |  Branch (52:43): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|    146|                                         __FILE__, __LINE__)
  ------------------
  |  Branch (835:9): [True: 0, False: 146]
  ------------------
  836|      0|        return 0;
  837|       |
  838|       |    /* |currlen| must always be <= |*maxlen| */
  839|    146|    if (!ossl_assert(*currlen <= *maxlen))
  ------------------
  |  |   52|    146|#  define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: "#x, \
  |  |   53|    146|                                         __FILE__, __LINE__)
  ------------------
  |  Branch (839:9): [True: 0, False: 146]
  ------------------
  840|      0|        return 0;
  841|       |
  842|    146|    if (buffer && *currlen == *maxlen) {
  ------------------
  |  Branch (842:9): [True: 0, False: 146]
  |  Branch (842:19): [True: 0, False: 0]
  ------------------
  843|      0|        if (*maxlen > INT_MAX - BUFFER_INC)
  ------------------
  |  |  828|      0|#define BUFFER_INC  1024
  ------------------
  |  Branch (843:13): [True: 0, False: 0]
  ------------------
  844|      0|            return 0;
  845|       |
  846|      0|        *maxlen += BUFFER_INC;
  ------------------
  |  |  828|      0|#define BUFFER_INC  1024
  ------------------
  847|      0|        if (*buffer == NULL) {
  ------------------
  |  Branch (847:13): [True: 0, False: 0]
  ------------------
  848|      0|            if ((*buffer = OPENSSL_malloc(*maxlen)) == NULL)
  ------------------
  |  |  102|      0|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (848:17): [True: 0, False: 0]
  ------------------
  849|      0|                return 0;
  850|      0|            if (*currlen > 0) {
  ------------------
  |  Branch (850:17): [True: 0, False: 0]
  ------------------
  851|      0|                if (!ossl_assert(*sbuffer != NULL))
  ------------------
  |  |   52|      0|#  define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: "#x, \
  |  |   53|      0|                                         __FILE__, __LINE__)
  ------------------
  |  Branch (851:21): [True: 0, False: 0]
  ------------------
  852|      0|                    return 0;
  853|      0|                memcpy(*buffer, *sbuffer, *currlen);
  854|      0|            }
  855|      0|            *sbuffer = NULL;
  856|      0|        } else {
  857|      0|            char *tmpbuf;
  858|       |
  859|      0|            tmpbuf = OPENSSL_realloc(*buffer, *maxlen);
  ------------------
  |  |  109|      0|        CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  860|      0|            if (tmpbuf == NULL)
  ------------------
  |  Branch (860:17): [True: 0, False: 0]
  ------------------
  861|      0|                return 0;
  862|      0|            *buffer = tmpbuf;
  863|      0|        }
  864|      0|    }
  865|       |
  866|    146|    if (*currlen < *maxlen) {
  ------------------
  |  Branch (866:9): [True: 146, False: 0]
  ------------------
  867|    146|        if (*sbuffer)
  ------------------
  |  Branch (867:13): [True: 146, False: 0]
  ------------------
  868|    146|            (*sbuffer)[(*currlen)++] = (char)c;
  869|      0|        else
  870|      0|            (*buffer)[(*currlen)++] = (char)c;
  871|    146|    }
  872|       |
  873|    146|    return 1;
  874|    146|}
bio_print.c:fmtstr:
  384|     10|{
  385|     10|    int padlen;
  386|     10|    size_t strln;
  387|     10|    int cnt = 0;
  388|       |
  389|     10|    if (value == 0)
  ------------------
  |  Branch (389:9): [True: 0, False: 10]
  ------------------
  390|      0|        value = "<NULL>";
  391|       |
  392|     10|    strln = OPENSSL_strnlen(value, max < 0 ? SIZE_MAX : (size_t)max);
  ------------------
  |  Branch (392:36): [True: 0, False: 10]
  ------------------
  393|       |
  394|     10|    padlen = min - strln;
  395|     10|    if (min < 0 || padlen < 0)
  ------------------
  |  Branch (395:9): [True: 0, False: 10]
  |  Branch (395:20): [True: 10, False: 0]
  ------------------
  396|     10|        padlen = 0;
  397|     10|    if (max >= 0) {
  ------------------
  |  Branch (397:9): [True: 10, False: 0]
  ------------------
  398|       |        /*
  399|       |         * Calculate the maximum output including padding.
  400|       |         * Make sure max doesn't overflow into negativity
  401|       |         */
  402|     10|        if (max < INT_MAX - padlen)
  ------------------
  |  Branch (402:13): [True: 10, False: 0]
  ------------------
  403|     10|            max += padlen;
  404|      0|        else
  405|      0|            max = INT_MAX;
  406|     10|    }
  407|     10|    if (flags & DP_F_MINUS)
  ------------------
  |  |   56|     10|#define DP_F_MINUS      (1 << 0)
  ------------------
  |  Branch (407:9): [True: 0, False: 10]
  ------------------
  408|      0|        padlen = -padlen;
  409|       |
  410|     10|    while ((padlen > 0) && (max < 0 || cnt < max)) {
  ------------------
  |  Branch (410:12): [True: 0, False: 10]
  |  Branch (410:29): [True: 0, False: 0]
  |  Branch (410:40): [True: 0, False: 0]
  ------------------
  411|      0|        if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
  ------------------
  |  Branch (411:13): [True: 0, False: 0]
  ------------------
  412|      0|            return 0;
  413|      0|        --padlen;
  414|      0|        ++cnt;
  415|      0|    }
  416|    118|    while (strln > 0 && (max < 0 || cnt < max)) {
  ------------------
  |  Branch (416:12): [True: 108, False: 10]
  |  Branch (416:26): [True: 0, False: 108]
  |  Branch (416:37): [True: 108, False: 0]
  ------------------
  417|    108|        if (!doapr_outch(sbuffer, buffer, currlen, maxlen, *value++))
  ------------------
  |  Branch (417:13): [True: 0, False: 108]
  ------------------
  418|      0|            return 0;
  419|    108|        --strln;
  420|    108|        ++cnt;
  421|    108|    }
  422|     10|    while ((padlen < 0) && (max < 0 || cnt < max)) {
  ------------------
  |  Branch (422:12): [True: 0, False: 10]
  |  Branch (422:29): [True: 0, False: 0]
  |  Branch (422:40): [True: 0, False: 0]
  ------------------
  423|      0|        if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
  ------------------
  |  Branch (423:13): [True: 0, False: 0]
  ------------------
  424|      0|            return 0;
  425|      0|        ++padlen;
  426|      0|        ++cnt;
  427|      0|    }
  428|     10|    return 1;
  429|     10|}

bio_sock_cleanup_int:
  201|      2|{
  202|       |# ifdef OPENSSL_SYS_WINDOWS
  203|       |    if (wsa_init_done) {
  204|       |        wsa_init_done = 0;
  205|       |        WSACleanup();
  206|       |    }
  207|       |# endif
  208|      2|}

ossl_bio_core_globals_free:
   26|      2|{
   27|      2|    OPENSSL_free(vbcg);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   28|      2|}
ossl_bio_core_globals_new:
   31|      4|{
   32|      4|    return OPENSSL_zalloc(sizeof(BIO_CORE_GLOBALS));
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   33|      4|}

BIO_new_file:
   58|      2|{
   59|      2|    BIO  *ret;
   60|      2|    FILE *file = openssl_fopen(filename, mode);
   61|      2|    int fp_flags = BIO_CLOSE;
  ------------------
  |  |   83|      2|# define BIO_CLOSE               0x01
  ------------------
   62|       |
   63|      2|    if (strchr(mode, 'b') == NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 2]
  ------------------
   64|      0|        fp_flags |= BIO_FP_TEXT;
  ------------------
  |  |  217|      0|# define BIO_FP_TEXT             0x10
  ------------------
   65|       |
   66|      2|    if (file == NULL) {
  ------------------
  |  Branch (66:9): [True: 2, False: 0]
  ------------------
   67|      2|        ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  403|      2|    (ERR_new(),                                                 \
  |  |  404|      2|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  ------------------
  |  |  |  |  312|      2|#    define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  405|      2|     ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   72|      2|# define ERR_LIB_SYS             2
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      2|# define get_last_sys_error()    errno
  ------------------
   68|      2|                       "calling fopen(%s, %s)",
   69|      2|                       filename, mode);
   70|      2|        if (errno == ENOENT
  ------------------
  |  Branch (70:13): [True: 2, False: 0]
  ------------------
   71|      2|#ifdef ENXIO
   72|      2|            || errno == ENXIO
  ------------------
  |  Branch (72:16): [True: 0, False: 0]
  ------------------
   73|      2|#endif
   74|      2|            )
   75|      2|            ERR_raise(ERR_LIB_BIO, BIO_R_NO_SUCH_FILE);
  ------------------
  |  |  401|      2|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      2|    (ERR_new(),                                                 \
  |  |  |  |  404|      2|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      2|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      2|     ERR_set_error)
  |  |  ------------------
  ------------------
   76|      0|        else
   77|      2|            ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
   78|      2|        return NULL;
   79|      2|    }
   80|      0|    if ((ret = BIO_new(BIO_s_file())) == NULL) {
  ------------------
  |  Branch (80:9): [True: 0, False: 0]
  ------------------
   81|      0|        fclose(file);
   82|      0|        return NULL;
   83|      0|    }
   84|       |
   85|       |    /* we did fopen -> we disengage UPLINK */
   86|      0|    BIO_clear_flags(ret, BIO_FLAGS_UPLINK_INTERNAL);
  ------------------
  |  |   18|      0|#  define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
   87|      0|    BIO_set_fp(ret, file, fp_flags);
  ------------------
  |  |  564|      0|# define BIO_set_fp(b,fp,c)      BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)(fp))
  |  |  ------------------
  |  |  |  |  436|      0|# define BIO_C_SET_FILE_PTR                      106
  |  |  ------------------
  ------------------
   88|      0|    return ret;
   89|      0|}

ossl_err_load_BN_strings:
   50|      2|{
   51|      2|#ifndef OPENSSL_NO_ERR
   52|      2|    if (ERR_reason_error_string(BN_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (52:9): [True: 2, False: 0]
  ------------------
   53|      2|        ERR_load_strings_const(BN_str_reasons);
   54|      2|#endif
   55|      2|    return 1;
   56|      2|}

ossl_err_load_BUF_strings:
   24|      2|{
   25|      2|#ifndef OPENSSL_NO_ERR
   26|      2|    if (ERR_reason_error_string(BUF_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (26:9): [True: 2, False: 0]
  ------------------
   27|      2|        ERR_load_strings_const(BUF_str_reasons);
   28|      2|#endif
   29|      2|    return 1;
   30|      2|}

ossl_err_load_CMP_strings:
  193|      2|{
  194|      2|# ifndef OPENSSL_NO_ERR
  195|      2|    if (ERR_reason_error_string(CMP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (195:9): [True: 2, False: 0]
  ------------------
  196|      2|        ERR_load_strings_const(CMP_str_reasons);
  197|      2|# endif
  198|      2|    return 1;
  199|      2|}

OSSL_CMP_log_close:
   41|      2|{
   42|      2|    (void)OSSL_trace_set_channel(OSSL_TRACE_CATEGORY_CMP, NULL);
  ------------------
  |  |   53|      2|# define OSSL_TRACE_CATEGORY_CMP                13
  ------------------
   43|      2|}

ossl_err_load_CMS_strings:
  173|      2|{
  174|      2|# ifndef OPENSSL_NO_ERR
  175|      2|    if (ERR_reason_error_string(CMS_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (175:9): [True: 2, False: 0]
  ------------------
  176|      2|        ERR_load_strings_const(CMS_str_reasons);
  177|      2|# endif
  178|      2|    return 1;
  179|      2|}

ossl_comp_brotli_cleanup:
  353|      2|{
  354|       |#ifdef BROTLI_SHARED
  355|       |    DSO_free(brotli_encode_dso);
  356|       |    brotli_encode_dso = NULL;
  357|       |    DSO_free(brotli_decode_dso);
  358|       |    brotli_decode_dso = NULL;
  359|       |    p_encode_init = NULL;
  360|       |    p_encode_stream = NULL;
  361|       |    p_encode_has_more = NULL;
  362|       |    p_encode_end = NULL;
  363|       |    p_encode_oneshot = NULL;
  364|       |    p_decode_init = NULL;
  365|       |    p_decode_stream = NULL;
  366|       |    p_decode_has_more = NULL;
  367|       |    p_decode_end = NULL;
  368|       |    p_decode_error = NULL;
  369|       |    p_decode_error_string = NULL;
  370|       |    p_decode_is_finished = NULL;
  371|       |    p_decode_oneshot = NULL;
  372|       |#endif
  373|      2|}

COMP_zlib:
  311|      4|{
  312|      4|    COMP_METHOD *meth = NULL;
  313|       |
  314|       |#ifndef OPENSSL_NO_ZLIB
  315|       |    if (RUN_ONCE(&zlib_once, ossl_comp_zlib_init))
  316|       |        meth = &zlib_stateful_method;
  317|       |#endif
  318|       |
  319|      4|    return meth;
  320|      4|}
ossl_comp_zlib_cleanup:
  336|      2|{
  337|       |#ifdef ZLIB_SHARED
  338|       |    DSO_free(zlib_dso);
  339|       |    zlib_dso = NULL;
  340|       |#endif
  341|      2|}

ossl_comp_zstd_cleanup:
  428|      2|{
  429|       |#ifdef ZSTD_SHARED
  430|       |    DSO_free(zstd_dso);
  431|       |    zstd_dso = NULL;
  432|       |    p_createCStream = NULL;
  433|       |    p_initCStream = NULL;
  434|       |    p_freeCStream = NULL;
  435|       |    p_compressStream2 = NULL;
  436|       |    p_flushStream = NULL;
  437|       |    p_endStream = NULL;
  438|       |    p_compress = NULL;
  439|       |    p_createDStream = NULL;
  440|       |    p_initDStream = NULL;
  441|       |    p_freeDStream = NULL;
  442|       |    p_decompressStream = NULL;
  443|       |    p_decompress = NULL;
  444|       |    p_isError = NULL;
  445|       |    p_getErrorName = NULL;
  446|       |    p_DStreamInSize = NULL;
  447|       |    p_CStreamInSize = NULL;
  448|       |#endif
  449|      2|}

ossl_err_load_COMP_strings:
   45|      2|{
   46|      2|# ifndef OPENSSL_NO_ERR
   47|      2|    if (ERR_reason_error_string(COMP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (47:9): [True: 2, False: 0]
  ------------------
   48|      2|        ERR_load_strings_const(COMP_str_reasons);
   49|      2|# endif
   50|      2|    return 1;
   51|      2|}

COMP_get_type:
   41|      4|{
   42|      4|    if (meth == NULL)
  ------------------
  |  Branch (42:9): [True: 4, False: 0]
  ------------------
   43|      4|        return NID_undef;
  ------------------
  |  |   18|      4|#define NID_undef                       0
  ------------------
   44|      0|    return meth->type;
   45|      4|}

ossl_load_builtin_compressions:
   29|      4|{
   30|      4|    STACK_OF(SSL_COMP) *comp_methods = NULL;
  ------------------
  |  |   31|      4|# define STACK_OF(type) struct stack_st_##type
  ------------------
   31|      4|#ifndef OPENSSL_NO_COMP
   32|      4|    SSL_COMP *comp = NULL;
   33|      4|    COMP_METHOD *method = COMP_zlib();
   34|       |
   35|      4|    comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
  ------------------
  |  |   69|      4|#define sk_SSL_COMP_new(cmp) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new(ossl_check_SSL_COMP_compfunc_type(cmp)))
  ------------------
   36|       |
   37|      4|    if (COMP_get_type(method) != NID_undef && comp_methods != NULL) {
  ------------------
  |  |   18|      8|#define NID_undef                       0
  ------------------
  |  Branch (37:9): [True: 0, False: 4]
  |  Branch (37:47): [True: 0, False: 0]
  ------------------
   38|      0|        comp = OPENSSL_malloc(sizeof(*comp));
  ------------------
  |  |  102|      0|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|      0|        if (comp != NULL) {
  ------------------
  |  Branch (39:13): [True: 0, False: 0]
  ------------------
   40|      0|            comp->method = method;
   41|      0|            comp->id = SSL_COMP_ZLIB_IDX;
  ------------------
  |  |   18|      0|#define SSL_COMP_ZLIB_IDX       1
  ------------------
   42|      0|            comp->name = COMP_get_name(method);
   43|      0|            if (!sk_SSL_COMP_push(comp_methods, comp))
  ------------------
  |  |   77|      0|#define sk_SSL_COMP_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
  ------------------
  |  Branch (43:17): [True: 0, False: 0]
  ------------------
   44|      0|                OPENSSL_free(comp);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|      0|        }
   46|      0|    }
   47|      4|#endif
   48|      4|    return comp_methods;
   49|      4|}
ossl_free_compression_methods_int:
   57|      2|{
   58|      2|    sk_SSL_COMP_pop_free(methods, cmeth_free);
  ------------------
  |  |   81|      2|#define sk_SSL_COMP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SSL_COMP_sk_type(sk),ossl_check_SSL_COMP_freefunc_type(freefunc))
  ------------------
   59|      2|}

_CONF_free_data:
  137|      2|{
  138|      2|    if (conf == NULL)
  ------------------
  |  Branch (138:9): [True: 0, False: 2]
  ------------------
  139|      0|        return;
  140|       |
  141|      2|    OPENSSL_free(conf->includedir);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  142|      2|    if (conf->data == NULL)
  ------------------
  |  Branch (142:9): [True: 2, False: 0]
  ------------------
  143|      2|        return;
  144|       |
  145|       |    /* evil thing to make sure the 'OPENSSL_free()' works as expected */
  146|      0|    lh_CONF_VALUE_set_down_load(conf->data, 0);
  ------------------
  |  |   83|      0|#define lh_CONF_VALUE_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_CONF_VALUE_lh_type(lh), dl)
  ------------------
  147|      0|    lh_CONF_VALUE_doall_LH_CONF_VALUE(conf->data, value_free_hash, conf->data);
  148|       |
  149|       |    /*
  150|       |     * We now have only 'section' entries in the hash table. Due to problems
  151|       |     * with
  152|       |     */
  153|       |
  154|      0|    lh_CONF_VALUE_doall(conf->data, value_free_stack_doall);
  ------------------
  |  |   84|      0|#define lh_CONF_VALUE_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_doallfunc_type(dfn))
  ------------------
  155|      0|    lh_CONF_VALUE_free(conf->data);
  ------------------
  |  |   72|      0|#define lh_CONF_VALUE_free(lh) OPENSSL_LH_free(ossl_check_CONF_VALUE_lh_type(lh))
  ------------------
  156|      0|}

NCONF_default:
   87|      2|{
   88|      2|    return &default_method;
   89|      2|}
conf_def.c:def_create:
  112|      2|{
  113|      2|    CONF *ret;
  114|       |
  115|      2|    ret = OPENSSL_malloc(sizeof(*ret));
  ------------------
  |  |  102|      2|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  116|      2|    if (ret != NULL)
  ------------------
  |  Branch (116:9): [True: 2, False: 0]
  ------------------
  117|      2|        if (meth->init(ret) == 0) {
  ------------------
  |  Branch (117:13): [True: 0, False: 2]
  ------------------
  118|      0|            OPENSSL_free(ret);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  119|      0|            ret = NULL;
  120|      0|        }
  121|      2|    return ret;
  122|      2|}
conf_def.c:def_init_default:
  125|      2|{
  126|      2|    if (conf == NULL)
  ------------------
  |  Branch (126:9): [True: 0, False: 2]
  ------------------
  127|      0|        return 0;
  128|       |
  129|      2|    memset(conf, 0, sizeof(*conf));
  130|      2|    conf->meth = &default_method;
  131|      2|    conf->meth_data = (void *)CONF_type_default;
  132|       |
  133|      2|    return 1;
  134|      2|}
conf_def.c:def_destroy:
  151|      2|{
  152|      2|    if (def_destroy_data(conf)) {
  ------------------
  |  Branch (152:9): [True: 2, False: 0]
  ------------------
  153|      2|        OPENSSL_free(conf);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|      2|        return 1;
  155|      2|    }
  156|      0|    return 0;
  157|      2|}
conf_def.c:def_destroy_data:
  160|      2|{
  161|      2|    if (conf == NULL)
  ------------------
  |  Branch (161:9): [True: 0, False: 2]
  ------------------
  162|      0|        return 0;
  163|      2|    _CONF_free_data(conf);
  164|      2|    return 1;
  165|      2|}
conf_def.c:def_load:
  168|      2|{
  169|      2|    int ret;
  170|      2|    BIO *in = NULL;
  171|       |
  172|       |#ifdef OPENSSL_SYS_VMS
  173|       |    in = BIO_new_file(name, "r");
  174|       |#else
  175|      2|    in = BIO_new_file(name, "rb");
  176|      2|#endif
  177|      2|    if (in == NULL) {
  ------------------
  |  Branch (177:9): [True: 2, False: 0]
  ------------------
  178|      2|        if (ERR_GET_REASON(ERR_peek_last_error()) == BIO_R_NO_SUCH_FILE)
  ------------------
  |  |   48|      2|# define BIO_R_NO_SUCH_FILE                               128
  ------------------
  |  Branch (178:13): [True: 2, False: 0]
  ------------------
  179|      2|            ERR_raise(ERR_LIB_CONF, CONF_R_NO_SUCH_FILE);
  ------------------
  |  |  401|      2|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      2|    (ERR_new(),                                                 \
  |  |  |  |  404|      2|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      2|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      2|     ERR_set_error)
  |  |  ------------------
  ------------------
  180|      0|        else
  181|      2|            ERR_raise(ERR_LIB_CONF, ERR_R_SYS_LIB);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  182|      2|        return 0;
  183|      2|    }
  184|       |
  185|      0|    ret = def_load_bio(conf, in, line);
  186|      0|    BIO_free(in);
  187|       |
  188|      0|    return ret;
  189|      2|}

ossl_err_load_CONF_strings:
   68|      2|{
   69|      2|#ifndef OPENSSL_NO_ERR
   70|      2|    if (ERR_reason_error_string(CONF_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (70:9): [True: 2, False: 0]
  ------------------
   71|      2|        ERR_load_strings_const(CONF_str_reasons);
   72|      2|#endif
   73|      2|    return 1;
   74|      2|}

NCONF_new_ex:
  183|      2|{
  184|      2|    CONF *ret;
  185|       |
  186|      2|    if (meth == NULL)
  ------------------
  |  Branch (186:9): [True: 2, False: 0]
  ------------------
  187|      2|        meth = NCONF_default();
  188|       |
  189|      2|    ret = meth->create(meth);
  190|      2|    if (ret == NULL) {
  ------------------
  |  Branch (190:9): [True: 0, False: 2]
  ------------------
  191|      0|        ERR_raise(ERR_LIB_CONF, ERR_R_CONF_LIB);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  192|      0|        return NULL;
  193|      0|    }
  194|      2|    ret->libctx = libctx;
  195|       |
  196|      2|    return ret;
  197|      2|}
NCONF_free:
  205|      2|{
  206|      2|    if (conf == NULL)
  ------------------
  |  Branch (206:9): [True: 0, False: 2]
  ------------------
  207|      0|        return;
  208|      2|    conf->meth->destroy(conf);
  209|      2|}
NCONF_load:
  251|      2|{
  252|      2|    if (conf == NULL) {
  ------------------
  |  Branch (252:9): [True: 0, False: 2]
  ------------------
  253|      0|        ERR_raise(ERR_LIB_CONF, CONF_R_NO_CONF);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  254|      0|        return 0;
  255|      0|    }
  256|       |
  257|      2|    return conf->meth->load(conf, file, eline);
  258|      2|}

CONF_modules_load_file_ex:
  193|      2|{
  194|      2|    char *file = NULL;
  195|      2|    CONF *conf = NULL;
  196|      2|    int ret = 0, diagnostics = OSSL_LIB_CTX_get_conf_diagnostics(libctx);
  197|       |
  198|      2|    ERR_set_mark();
  199|       |
  200|      2|    if (filename == NULL) {
  ------------------
  |  Branch (200:9): [True: 2, False: 0]
  ------------------
  201|      2|        file = CONF_get1_default_config_file();
  202|      2|        if (file == NULL)
  ------------------
  |  Branch (202:13): [True: 0, False: 2]
  ------------------
  203|      0|            goto err;
  204|      2|        if (*file == '\0') {
  ------------------
  |  Branch (204:13): [True: 0, False: 2]
  ------------------
  205|       |            /* Do not try to load an empty file name but do not error out */
  206|      0|            ret = 1;
  207|      0|            goto err;
  208|      0|        }
  209|      2|    } else {
  210|      0|        file = (char *)filename;
  211|      0|    }
  212|       |
  213|      2|    conf = NCONF_new_ex(libctx, NULL);
  214|      2|    if (conf == NULL)
  ------------------
  |  Branch (214:9): [True: 0, False: 2]
  ------------------
  215|      0|        goto err;
  216|       |
  217|      2|    if (NCONF_load(conf, file, NULL) <= 0) {
  ------------------
  |  Branch (217:9): [True: 2, False: 0]
  ------------------
  218|      2|        if ((flags & CONF_MFLAGS_IGNORE_MISSING_FILE) &&
  ------------------
  |  |  110|      2|# define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
  ------------------
  |  Branch (218:13): [True: 2, False: 0]
  ------------------
  219|      2|            (ERR_GET_REASON(ERR_peek_last_error()) == CONF_R_NO_SUCH_FILE)) {
  ------------------
  |  |   36|      2|# define CONF_R_NO_SUCH_FILE                              114
  ------------------
  |  Branch (219:13): [True: 2, False: 0]
  ------------------
  220|      2|            ret = 1;
  221|      2|        }
  222|      2|        goto err;
  223|      2|    }
  224|       |
  225|      0|    ret = CONF_modules_load(conf, appname, flags);
  226|       |    /* CONF_modules_load() might change the diagnostics setting, reread it. */
  227|      0|    diagnostics = OSSL_LIB_CTX_get_conf_diagnostics(libctx);
  228|       |
  229|      2| err:
  230|      2|    if (filename == NULL)
  ------------------
  |  Branch (230:9): [True: 2, False: 0]
  ------------------
  231|      2|        OPENSSL_free(file);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  232|      2|    NCONF_free(conf);
  233|       |
  234|      2|    if ((flags & CONF_MFLAGS_IGNORE_RETURN_CODES) != 0 && !diagnostics)
  ------------------
  |  |  107|      2|# define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
  ------------------
  |  Branch (234:9): [True: 2, False: 0]
  |  Branch (234:59): [True: 2, False: 0]
  ------------------
  235|      2|        ret = 1;
  236|       |
  237|      2|    if (ret > 0)
  ------------------
  |  Branch (237:9): [True: 2, False: 0]
  ------------------
  238|      2|        ERR_pop_to_mark();
  239|      0|    else
  240|      0|        ERR_clear_last_mark();
  241|       |
  242|      2|    return ret;
  243|      0|}
CONF_modules_unload:
  517|      2|{
  518|      2|    int i;
  519|      2|    CONF_MODULE *md;
  520|      2|    STACK_OF(CONF_MODULE) *old_modules;
  ------------------
  |  |   31|      2|# define STACK_OF(type) struct stack_st_##type
  ------------------
  521|      2|    STACK_OF(CONF_MODULE) *new_modules;
  ------------------
  |  |   31|      2|# define STACK_OF(type) struct stack_st_##type
  ------------------
  522|      2|    STACK_OF(CONF_MODULE) *to_delete;
  ------------------
  |  |   31|      2|# define STACK_OF(type) struct stack_st_##type
  ------------------
  523|       |
  524|      2|    if (!conf_modules_finish_int()) /* also inits module list lock */
  ------------------
  |  Branch (524:9): [True: 0, False: 2]
  ------------------
  525|      0|        return;
  526|       |
  527|      2|    ossl_rcu_write_lock(module_list_lock);
  528|       |
  529|      2|    old_modules = ossl_rcu_deref(&supported_modules);
  ------------------
  |  |   30|      2|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  530|      2|    new_modules = sk_CONF_MODULE_dup(old_modules);
  531|       |
  532|      2|    if (new_modules == NULL) {
  ------------------
  |  Branch (532:9): [True: 0, False: 2]
  ------------------
  533|      0|        ossl_rcu_write_unlock(module_list_lock);
  534|      0|        return;
  535|      0|    }
  536|       |
  537|      2|    to_delete = sk_CONF_MODULE_new_null();
  538|       |
  539|       |    /* unload modules in reverse order */
  540|      2|    for (i = sk_CONF_MODULE_num(new_modules) - 1; i >= 0; i--) {
  ------------------
  |  Branch (540:51): [True: 0, False: 2]
  ------------------
  541|      0|        md = sk_CONF_MODULE_value(new_modules, i);
  542|       |        /* If static or in use and 'all' not set ignore it */
  543|      0|        if (((md->links > 0) || !md->dso) && !all)
  ------------------
  |  Branch (543:14): [True: 0, False: 0]
  |  Branch (543:33): [True: 0, False: 0]
  |  Branch (543:46): [True: 0, False: 0]
  ------------------
  544|      0|            continue;
  545|       |        /* Since we're working in reverse this is OK */
  546|      0|        (void)sk_CONF_MODULE_delete(new_modules, i);
  547|      0|        sk_CONF_MODULE_push(to_delete, md);
  548|      0|    }
  549|       |
  550|      2|    if (sk_CONF_MODULE_num(new_modules) == 0) {
  ------------------
  |  Branch (550:9): [True: 2, False: 0]
  ------------------
  551|      2|        sk_CONF_MODULE_free(new_modules);
  552|      2|        new_modules = NULL;
  553|      2|    }
  554|       |
  555|      2|    ossl_rcu_assign_ptr(&supported_modules, &new_modules);
  ------------------
  |  |   31|      2|#define ossl_rcu_assign_ptr(p,v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  556|      2|    ossl_rcu_write_unlock(module_list_lock);
  557|      2|    ossl_synchronize_rcu(module_list_lock);
  558|      2|    sk_CONF_MODULE_free(old_modules);
  559|      2|    sk_CONF_MODULE_pop_free(to_delete, module_free);
  560|       |
  561|      2|}
ossl_config_modules_free:
  632|      2|{
  633|      2|    CONF_modules_unload(1); /* calls CONF_modules_finish */
  634|      2|    module_lists_free();
  635|      2|}
CONF_get1_default_config_file:
  686|      2|{
  687|      2|    const char *t;
  688|      2|    char *file, *sep = "";
  689|      2|    size_t size;
  690|       |
  691|      2|    if ((file = ossl_safe_getenv("OPENSSL_CONF")) != NULL)
  ------------------
  |  Branch (691:9): [True: 0, False: 2]
  ------------------
  692|      0|        return OPENSSL_strdup(file);
  ------------------
  |  |  119|      0|        CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  693|       |
  694|      2|    t = X509_get_default_cert_area();
  695|       |    /*
  696|       |     * On windows systems with -DOSSL_WINCTX set, if the needed registry
  697|       |     * keys are not yet set, openssl applets will return, due to an inability
  698|       |     * to locate various directories, like the default cert area.  In that
  699|       |     * event, clone an empty string here, so that commands like openssl version
  700|       |     * continue to operate properly without needing to set OPENSSL_CONF.
  701|       |     * Applets like cms will fail gracefully later when they try to parse an
  702|       |     * empty config file
  703|       |     */
  704|      2|    if (t == NULL)
  ------------------
  |  Branch (704:9): [True: 0, False: 2]
  ------------------
  705|      0|        return OPENSSL_strdup("");
  ------------------
  |  |  119|      0|        CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  706|       |
  707|      2|#ifndef OPENSSL_SYS_VMS
  708|      2|    sep = "/";
  709|      2|#endif
  710|      2|    size = strlen(t) + strlen(sep) + strlen(OPENSSL_CONF) + 1;
  ------------------
  |  |   81|      2|# define OPENSSL_CONF             "openssl.cnf"
  ------------------
  711|      2|    file = OPENSSL_malloc(size);
  ------------------
  |  |  102|      2|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  712|       |
  713|      2|    if (file == NULL)
  ------------------
  |  Branch (713:9): [True: 0, False: 2]
  ------------------
  714|      0|        return NULL;
  715|      2|    BIO_snprintf(file, size, "%s%s%s", t, sep, OPENSSL_CONF);
  ------------------
  |  |   81|      2|# define OPENSSL_CONF             "openssl.cnf"
  ------------------
  716|       |
  717|      2|    return file;
  718|      2|}
conf_mod.c:do_init_module_list_lock:
  101|      2|{
  102|      2|    module_list_lock = ossl_rcu_lock_new(1, NULL);
  103|      2|    if (module_list_lock == NULL) {
  ------------------
  |  Branch (103:9): [True: 0, False: 2]
  ------------------
  104|      0|        ERR_raise(ERR_LIB_CONF, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  105|      0|        return 0;
  106|      0|    }
  107|       |
  108|      2|    return 1;
  109|      2|}
conf_mod.c:conf_modules_finish_int:
  574|      2|{
  575|      2|    CONF_IMODULE *imod;
  576|      2|    STACK_OF(CONF_IMODULE) *old_modules;
  ------------------
  |  |   31|      2|# define STACK_OF(type) struct stack_st_##type
  ------------------
  577|      2|    STACK_OF(CONF_IMODULE) *new_modules = NULL;
  ------------------
  |  |   31|      2|# define STACK_OF(type) struct stack_st_##type
  ------------------
  578|       |
  579|      2|    if (!RUN_ONCE(&init_module_list_lock, do_init_module_list_lock))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (579:9): [True: 0, False: 2]
  ------------------
  580|      0|        return 0;
  581|       |
  582|       |    /* If module_list_lock is NULL here it means we were already unloaded */
  583|      2|    if (module_list_lock == NULL)
  ------------------
  |  Branch (583:9): [True: 0, False: 2]
  ------------------
  584|      0|        return 0;
  585|       |
  586|      2|    ossl_rcu_write_lock(module_list_lock);
  587|      2|    old_modules = ossl_rcu_deref(&initialized_modules);
  ------------------
  |  |   30|      2|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  588|      2|    ossl_rcu_assign_ptr(&initialized_modules, &new_modules);
  ------------------
  |  |   31|      2|#define ossl_rcu_assign_ptr(p,v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  589|      2|    ossl_rcu_write_unlock(module_list_lock);
  590|      2|    ossl_synchronize_rcu(module_list_lock);
  591|       |
  592|      2|    while (sk_CONF_IMODULE_num(old_modules) > 0) {
  ------------------
  |  Branch (592:12): [True: 0, False: 2]
  ------------------
  593|      0|        imod = sk_CONF_IMODULE_pop(old_modules);
  594|      0|        module_finish(imod);
  595|      0|    }
  596|      2|    sk_CONF_IMODULE_free(old_modules);
  597|       |
  598|      2|    return 1;
  599|      2|}
conf_mod.c:module_lists_free:
   89|      2|{
   90|      2|    ossl_rcu_lock_free(module_list_lock);
   91|      2|    module_list_lock = NULL;
   92|       |
   93|      2|    sk_CONF_MODULE_free(supported_modules);
   94|      2|    supported_modules = NULL;
   95|       |
   96|      2|    sk_CONF_IMODULE_free(initialized_modules);
   97|      2|    initialized_modules = NULL;
   98|      2|}

ossl_config_int:
   47|      2|{
   48|      2|    int ret = 0;
   49|      2|#if defined(OPENSSL_INIT_DEBUG) || !defined(OPENSSL_SYS_UEFI)
   50|      2|    const char *filename;
   51|      2|    const char *appname;
   52|      2|    unsigned long flags;
   53|      2|#endif
   54|       |
   55|      2|    if (openssl_configured)
  ------------------
  |  Branch (55:9): [True: 0, False: 2]
  ------------------
   56|      0|        return 1;
   57|       |
   58|      2|#if defined(OPENSSL_INIT_DEBUG) || !defined(OPENSSL_SYS_UEFI)
   59|      2|    filename = settings ? settings->filename : NULL;
  ------------------
  |  Branch (59:16): [True: 0, False: 2]
  ------------------
   60|      2|    appname = settings ? settings->appname : NULL;
  ------------------
  |  Branch (60:15): [True: 0, False: 2]
  ------------------
   61|      2|    flags = settings ? settings->flags : DEFAULT_CONF_MFLAGS;
  ------------------
  |  |   17|      4|    (CONF_MFLAGS_DEFAULT_SECTION | \
  |  |  ------------------
  |  |  |  |  111|      2|# define CONF_MFLAGS_DEFAULT_SECTION     0x20
  |  |  ------------------
  |  |   18|      4|     CONF_MFLAGS_IGNORE_MISSING_FILE | \
  |  |  ------------------
  |  |  |  |  110|      2|# define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
  |  |  ------------------
  |  |   19|      4|     CONF_MFLAGS_IGNORE_RETURN_CODES)
  |  |  ------------------
  |  |  |  |  107|      2|# define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
  |  |  ------------------
  ------------------
  |  Branch (61:13): [True: 0, False: 2]
  ------------------
   62|      2|#endif
   63|       |
   64|       |#ifdef OPENSSL_INIT_DEBUG
   65|       |    fprintf(stderr, "OPENSSL_INIT: ossl_config_int(%s, %s, %lu)\n",
   66|       |            filename, appname, flags);
   67|       |#endif
   68|       |
   69|      2|#ifndef OPENSSL_SYS_UEFI
   70|      2|    ret = CONF_modules_load_file_ex(OSSL_LIB_CTX_get0_global_default(),
   71|      2|                                    filename, appname, flags);
   72|       |#else
   73|       |    ret = 1;
   74|       |#endif
   75|      2|    openssl_configured = 1;
   76|      2|    return ret;
   77|      2|}

ossl_lib_ctx_default_deinit:
  417|      2|{
  418|      2|    if (!default_context_inited)
  ------------------
  |  Branch (418:9): [True: 0, False: 2]
  ------------------
  419|      0|        return;
  420|      2|    context_deinit(&default_context_int);
  421|      2|    CRYPTO_THREAD_cleanup_local(&default_context_thread_local);
  422|      2|    default_context_inited = 0;
  423|      2|}
OSSL_LIB_CTX_new:
  452|      2|{
  453|      2|    OSSL_LIB_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  104|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  454|       |
  455|      2|    if (ctx != NULL && !context_init(ctx)) {
  ------------------
  |  Branch (455:9): [True: 2, False: 0]
  |  Branch (455:24): [True: 0, False: 2]
  ------------------
  456|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  457|      0|        ctx = NULL;
  458|      0|    }
  459|      2|    return ctx;
  460|      2|}
OSSL_LIB_CTX_get0_global_default:
  517|      2|{
  518|      2|    if (!RUN_ONCE(&default_context_init, default_context_do_init))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (518:9): [True: 0, False: 2]
  ------------------
  519|      0|        return NULL;
  520|       |
  521|      2|    return &default_context_int;
  522|      2|}
ossl_lib_ctx_get_concrete:
  548|     72|{
  549|     72|#ifndef FIPS_MODULE
  550|     72|    if (ctx == NULL)
  ------------------
  |  Branch (550:9): [True: 32, False: 40]
  ------------------
  551|     32|        return get_default_context();
  552|     40|#endif
  553|     40|    return ctx;
  554|     72|}
ossl_lib_ctx_is_default:
  557|      2|{
  558|      2|#ifndef FIPS_MODULE
  559|      2|    if (ctx == NULL || ctx == get_default_context())
  ------------------
  |  Branch (559:9): [True: 2, False: 0]
  |  Branch (559:24): [True: 0, False: 0]
  ------------------
  560|      2|        return 1;
  561|      0|#endif
  562|      0|    return 0;
  563|      2|}
ossl_lib_ctx_get_data:
  575|     62|{
  576|     62|    void *p;
  577|       |
  578|     62|    ctx = ossl_lib_ctx_get_concrete(ctx);
  579|     62|    if (ctx == NULL)
  ------------------
  |  Branch (579:9): [True: 0, False: 62]
  ------------------
  580|      0|        return NULL;
  581|       |
  582|     62|    switch (index) {
  583|     32|    case OSSL_LIB_CTX_PROPERTY_STRING_INDEX:
  ------------------
  |  |   99|     32|# define OSSL_LIB_CTX_PROPERTY_STRING_INDEX          3
  ------------------
  |  Branch (583:5): [True: 32, False: 30]
  ------------------
  584|     32|        return ctx->property_string_data;
  585|      2|    case OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX:
  ------------------
  |  |   96|      2|# define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX         0
  ------------------
  |  Branch (585:5): [True: 2, False: 60]
  ------------------
  586|      2|        return ctx->evp_method_store;
  587|     14|    case OSSL_LIB_CTX_PROVIDER_STORE_INDEX:
  ------------------
  |  |   97|     14|# define OSSL_LIB_CTX_PROVIDER_STORE_INDEX           1
  ------------------
  |  Branch (587:5): [True: 14, False: 48]
  ------------------
  588|     14|        return ctx->provider_store;
  589|      0|    case OSSL_LIB_CTX_NAMEMAP_INDEX:
  ------------------
  |  |  100|      0|# define OSSL_LIB_CTX_NAMEMAP_INDEX                  4
  ------------------
  |  Branch (589:5): [True: 0, False: 62]
  ------------------
  590|      0|        return ctx->namemap;
  591|      0|    case OSSL_LIB_CTX_PROPERTY_DEFN_INDEX:
  ------------------
  |  |   98|      0|# define OSSL_LIB_CTX_PROPERTY_DEFN_INDEX            2
  ------------------
  |  Branch (591:5): [True: 0, False: 62]
  ------------------
  592|      0|        return ctx->property_defns;
  593|      0|    case OSSL_LIB_CTX_GLOBAL_PROPERTIES:
  ------------------
  |  |  112|      0|# define OSSL_LIB_CTX_GLOBAL_PROPERTIES             14
  ------------------
  |  Branch (593:5): [True: 0, False: 62]
  ------------------
  594|      0|        return ctx->global_properties;
  595|      2|    case OSSL_LIB_CTX_DRBG_INDEX:
  ------------------
  |  |  101|      2|# define OSSL_LIB_CTX_DRBG_INDEX                     5
  ------------------
  |  Branch (595:5): [True: 2, False: 60]
  ------------------
  596|      2|        return ctx->drbg;
  597|      0|    case OSSL_LIB_CTX_DRBG_NONCE_INDEX:
  ------------------
  |  |  102|      0|# define OSSL_LIB_CTX_DRBG_NONCE_INDEX               6
  ------------------
  |  Branch (597:5): [True: 0, False: 62]
  ------------------
  598|      0|        return ctx->drbg_nonce;
  599|      0|#ifndef FIPS_MODULE
  600|      0|    case OSSL_LIB_CTX_PROVIDER_CONF_INDEX:
  ------------------
  |  |  114|      0|# define OSSL_LIB_CTX_PROVIDER_CONF_INDEX           16
  ------------------
  |  Branch (600:5): [True: 0, False: 62]
  ------------------
  601|      0|        return ctx->provider_conf;
  602|      0|    case OSSL_LIB_CTX_BIO_CORE_INDEX:
  ------------------
  |  |  115|      0|# define OSSL_LIB_CTX_BIO_CORE_INDEX                17
  ------------------
  |  Branch (602:5): [True: 0, False: 62]
  ------------------
  603|      0|        return ctx->bio_core;
  604|      0|    case OSSL_LIB_CTX_CHILD_PROVIDER_INDEX:
  ------------------
  |  |  116|      0|# define OSSL_LIB_CTX_CHILD_PROVIDER_INDEX          18
  ------------------
  |  Branch (604:5): [True: 0, False: 62]
  ------------------
  605|      0|        return ctx->child_provider;
  606|      2|    case OSSL_LIB_CTX_DECODER_STORE_INDEX:
  ------------------
  |  |  109|      2|# define OSSL_LIB_CTX_DECODER_STORE_INDEX           11
  ------------------
  |  Branch (606:5): [True: 2, False: 60]
  ------------------
  607|      2|        return ctx->decoder_store;
  608|      4|    case OSSL_LIB_CTX_DECODER_CACHE_INDEX:
  ------------------
  |  |  118|      4|# define OSSL_LIB_CTX_DECODER_CACHE_INDEX           20
  ------------------
  |  Branch (608:5): [True: 4, False: 58]
  ------------------
  609|      4|        return ctx->decoder_cache;
  610|      2|    case OSSL_LIB_CTX_ENCODER_STORE_INDEX:
  ------------------
  |  |  108|      2|# define OSSL_LIB_CTX_ENCODER_STORE_INDEX           10
  ------------------
  |  Branch (610:5): [True: 2, False: 60]
  ------------------
  611|      2|        return ctx->encoder_store;
  612|      2|    case OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX:
  ------------------
  |  |  113|      2|# define OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX      15
  ------------------
  |  Branch (612:5): [True: 2, False: 60]
  ------------------
  613|      2|        return ctx->store_loader_store;
  614|      0|    case OSSL_LIB_CTX_SELF_TEST_CB_INDEX:
  ------------------
  |  |  110|      0|# define OSSL_LIB_CTX_SELF_TEST_CB_INDEX            12
  ------------------
  |  Branch (614:5): [True: 0, False: 62]
  ------------------
  615|      0|        return ctx->self_test_cb;
  616|      0|    case OSSL_LIB_CTX_INDICATOR_CB_INDEX:
  ------------------
  |  |  120|      0|# define OSSL_LIB_CTX_INDICATOR_CB_INDEX            22
  ------------------
  |  Branch (616:5): [True: 0, False: 62]
  ------------------
  617|      0|        return ctx->indicator_cb;
  618|      0|#endif
  619|      0|#ifndef OPENSSL_NO_THREAD_POOL
  620|      0|    case OSSL_LIB_CTX_THREAD_INDEX:
  ------------------
  |  |  117|      0|# define OSSL_LIB_CTX_THREAD_INDEX                  19
  ------------------
  |  Branch (620:5): [True: 0, False: 62]
  ------------------
  621|      0|        return ctx->threads;
  622|      0|#endif
  623|       |
  624|      0|    case OSSL_LIB_CTX_RAND_CRNGT_INDEX: {
  ------------------
  |  |  103|      0|# define OSSL_LIB_CTX_RAND_CRNGT_INDEX               7
  ------------------
  |  Branch (624:5): [True: 0, False: 62]
  ------------------
  625|       |
  626|       |        /*
  627|       |         * rand_crngt must be lazily initialized because it calls into
  628|       |         * libctx, so must not be called from context_init, else a deadlock
  629|       |         * will occur.
  630|       |         *
  631|       |         * We use a separate lock because code called by the instantiation
  632|       |         * of rand_crngt is liable to try and take the libctx lock.
  633|       |         */
  634|      0|        if (CRYPTO_THREAD_read_lock(ctx->rand_crngt_lock) != 1)
  ------------------
  |  Branch (634:13): [True: 0, False: 0]
  ------------------
  635|      0|            return NULL;
  636|       |
  637|      0|        if (ctx->rand_crngt == NULL) {
  ------------------
  |  Branch (637:13): [True: 0, False: 0]
  ------------------
  638|      0|            CRYPTO_THREAD_unlock(ctx->rand_crngt_lock);
  639|       |
  640|      0|            if (CRYPTO_THREAD_write_lock(ctx->rand_crngt_lock) != 1)
  ------------------
  |  Branch (640:17): [True: 0, False: 0]
  ------------------
  641|      0|                return NULL;
  642|       |
  643|      0|            if (ctx->rand_crngt == NULL)
  ------------------
  |  Branch (643:17): [True: 0, False: 0]
  ------------------
  644|      0|                ctx->rand_crngt = ossl_rand_crng_ctx_new(ctx);
  645|      0|        }
  646|       |
  647|      0|        p = ctx->rand_crngt;
  648|       |
  649|      0|        CRYPTO_THREAD_unlock(ctx->rand_crngt_lock);
  650|       |
  651|      0|        return p;
  652|      0|    }
  653|       |
  654|       |#ifdef FIPS_MODULE
  655|       |    case OSSL_LIB_CTX_THREAD_EVENT_HANDLER_INDEX:
  656|       |        return ctx->thread_event_handler;
  657|       |
  658|       |    case OSSL_LIB_CTX_FIPS_PROV_INDEX:
  659|       |        return ctx->fips_prov;
  660|       |#endif
  661|       |
  662|      2|    case OSSL_LIB_CTX_COMP_METHODS:
  ------------------
  |  |  119|      2|# define OSSL_LIB_CTX_COMP_METHODS                  21
  ------------------
  |  Branch (662:5): [True: 2, False: 60]
  ------------------
  663|      2|        return (void *)&ctx->comp_methods;
  664|       |
  665|      0|    default:
  ------------------
  |  Branch (665:5): [True: 0, False: 62]
  ------------------
  666|      0|        return NULL;
  667|     62|    }
  668|     62|}
OSSL_LIB_CTX_get_data:
  671|      2|{
  672|      2|    return ossl_lib_ctx_get_data(ctx, index);
  673|      2|}
ossl_lib_ctx_get_ex_data_global:
  676|      6|{
  677|      6|    ctx = ossl_lib_ctx_get_concrete(ctx);
  678|      6|    if (ctx == NULL)
  ------------------
  |  Branch (678:9): [True: 0, False: 6]
  ------------------
  679|      0|        return NULL;
  680|      6|    return &ctx->global;
  681|      6|}
OSSL_LIB_CTX_get_conf_diagnostics:
  705|      2|{
  706|      2|    libctx = ossl_lib_ctx_get_concrete(libctx);
  707|      2|    if (libctx == NULL)
  ------------------
  |  Branch (707:9): [True: 0, False: 2]
  ------------------
  708|      0|        return 0;
  709|      2|    return libctx->conf_diagnostics;
  710|      2|}
context.c:context_deinit:
  373|      2|{
  374|      2|    if (ctx == NULL)
  ------------------
  |  Branch (374:9): [True: 0, False: 2]
  ------------------
  375|      0|        return 1;
  376|       |
  377|      2|    ossl_ctx_thread_stop(ctx);
  378|       |
  379|      2|    context_deinit_objs(ctx);
  380|       |
  381|      2|    ossl_crypto_cleanup_all_ex_data_int(ctx);
  382|       |
  383|      2|    CRYPTO_THREAD_lock_free(ctx->rand_crngt_lock);
  384|      2|    CRYPTO_THREAD_lock_free(ctx->lock);
  385|      2|    ctx->rand_crngt_lock = NULL;
  386|      2|    ctx->lock = NULL;
  387|      2|    CRYPTO_THREAD_cleanup_local(&ctx->rcu_local_key);
  388|      2|    return 1;
  389|      2|}
context.c:context_deinit_objs:
  233|      2|{
  234|       |    /* P2. We want evp_method_store to be cleaned up before the provider store */
  235|      2|    if (ctx->evp_method_store != NULL) {
  ------------------
  |  Branch (235:9): [True: 2, False: 0]
  ------------------
  236|      2|        ossl_method_store_free(ctx->evp_method_store);
  237|      2|        ctx->evp_method_store = NULL;
  238|      2|    }
  239|       |
  240|       |    /* P2. */
  241|      2|    if (ctx->drbg != NULL) {
  ------------------
  |  Branch (241:9): [True: 2, False: 0]
  ------------------
  242|      2|        ossl_rand_ctx_free(ctx->drbg);
  243|      2|        ctx->drbg = NULL;
  244|      2|    }
  245|       |
  246|      2|#ifndef FIPS_MODULE
  247|       |    /* P2. */
  248|      2|    if (ctx->provider_conf != NULL) {
  ------------------
  |  Branch (248:9): [True: 2, False: 0]
  ------------------
  249|      2|        ossl_prov_conf_ctx_free(ctx->provider_conf);
  250|      2|        ctx->provider_conf = NULL;
  251|      2|    }
  252|       |
  253|       |    /*
  254|       |     * P2. We want decoder_store/decoder_cache to be cleaned up before the
  255|       |     * provider store
  256|       |     */
  257|      2|    if (ctx->decoder_store != NULL) {
  ------------------
  |  Branch (257:9): [True: 2, False: 0]
  ------------------
  258|      2|        ossl_method_store_free(ctx->decoder_store);
  259|      2|        ctx->decoder_store = NULL;
  260|      2|    }
  261|      2|    if (ctx->decoder_cache != NULL) {
  ------------------
  |  Branch (261:9): [True: 2, False: 0]
  ------------------
  262|      2|        ossl_decoder_cache_free(ctx->decoder_cache);
  263|      2|        ctx->decoder_cache = NULL;
  264|      2|    }
  265|       |
  266|       |
  267|       |    /* P2. We want encoder_store to be cleaned up before the provider store */
  268|      2|    if (ctx->encoder_store != NULL) {
  ------------------
  |  Branch (268:9): [True: 2, False: 0]
  ------------------
  269|      2|        ossl_method_store_free(ctx->encoder_store);
  270|      2|        ctx->encoder_store = NULL;
  271|      2|    }
  272|       |
  273|       |    /* P2. We want loader_store to be cleaned up before the provider store */
  274|      2|    if (ctx->store_loader_store != NULL) {
  ------------------
  |  Branch (274:9): [True: 2, False: 0]
  ------------------
  275|      2|        ossl_method_store_free(ctx->store_loader_store);
  276|      2|        ctx->store_loader_store = NULL;
  277|      2|    }
  278|      2|#endif
  279|       |
  280|       |    /* P1. Needs to be freed before the child provider data is freed */
  281|      2|    if (ctx->provider_store != NULL) {
  ------------------
  |  Branch (281:9): [True: 2, False: 0]
  ------------------
  282|      2|        ossl_provider_store_free(ctx->provider_store);
  283|      2|        ctx->provider_store = NULL;
  284|      2|    }
  285|       |
  286|       |    /* Default priority. */
  287|      2|    if (ctx->property_string_data != NULL) {
  ------------------
  |  Branch (287:9): [True: 2, False: 0]
  ------------------
  288|      2|        ossl_property_string_data_free(ctx->property_string_data);
  289|      2|        ctx->property_string_data = NULL;
  290|      2|    }
  291|       |
  292|      2|    if (ctx->namemap != NULL) {
  ------------------
  |  Branch (292:9): [True: 2, False: 0]
  ------------------
  293|      2|        ossl_stored_namemap_free(ctx->namemap);
  294|      2|        ctx->namemap = NULL;
  295|      2|    }
  296|       |
  297|      2|    if (ctx->property_defns != NULL) {
  ------------------
  |  Branch (297:9): [True: 2, False: 0]
  ------------------
  298|      2|        ossl_property_defns_free(ctx->property_defns);
  299|      2|        ctx->property_defns = NULL;
  300|      2|    }
  301|       |
  302|      2|    if (ctx->global_properties != NULL) {
  ------------------
  |  Branch (302:9): [True: 2, False: 0]
  ------------------
  303|      2|        ossl_ctx_global_properties_free(ctx->global_properties);
  304|      2|        ctx->global_properties = NULL;
  305|      2|    }
  306|       |
  307|      2|#ifndef FIPS_MODULE
  308|      2|    if (ctx->bio_core != NULL) {
  ------------------
  |  Branch (308:9): [True: 2, False: 0]
  ------------------
  309|      2|        ossl_bio_core_globals_free(ctx->bio_core);
  310|      2|        ctx->bio_core = NULL;
  311|      2|    }
  312|      2|#endif
  313|       |
  314|      2|    if (ctx->drbg_nonce != NULL) {
  ------------------
  |  Branch (314:9): [True: 2, False: 0]
  ------------------
  315|      2|        ossl_prov_drbg_nonce_ctx_free(ctx->drbg_nonce);
  316|      2|        ctx->drbg_nonce = NULL;
  317|      2|    }
  318|       |
  319|      2|#ifndef FIPS_MODULE
  320|      2|    if (ctx->indicator_cb != NULL) {
  ------------------
  |  Branch (320:9): [True: 2, False: 0]
  ------------------
  321|      2|        ossl_indicator_set_callback_free(ctx->indicator_cb);
  322|      2|        ctx->indicator_cb = NULL;
  323|      2|    }
  324|       |
  325|      2|    if (ctx->self_test_cb != NULL) {
  ------------------
  |  Branch (325:9): [True: 2, False: 0]
  ------------------
  326|      2|        ossl_self_test_set_callback_free(ctx->self_test_cb);
  327|      2|        ctx->self_test_cb = NULL;
  328|      2|    }
  329|      2|#endif
  330|       |
  331|      2|    if (ctx->rand_crngt != NULL) {
  ------------------
  |  Branch (331:9): [True: 0, False: 2]
  ------------------
  332|      0|        ossl_rand_crng_ctx_free(ctx->rand_crngt);
  333|      0|        ctx->rand_crngt = NULL;
  334|      0|    }
  335|       |
  336|       |#ifdef FIPS_MODULE
  337|       |    if (ctx->thread_event_handler != NULL) {
  338|       |        ossl_thread_event_ctx_free(ctx->thread_event_handler);
  339|       |        ctx->thread_event_handler = NULL;
  340|       |    }
  341|       |
  342|       |    if (ctx->fips_prov != NULL) {
  343|       |        ossl_fips_prov_ossl_ctx_free(ctx->fips_prov);
  344|       |        ctx->fips_prov = NULL;
  345|       |    }
  346|       |#endif
  347|       |
  348|      2|#ifndef OPENSSL_NO_THREAD_POOL
  349|      2|    if (ctx->threads != NULL) {
  ------------------
  |  Branch (349:9): [True: 2, False: 0]
  ------------------
  350|      2|        ossl_threads_ctx_free(ctx->threads);
  351|      2|        ctx->threads = NULL;
  352|      2|    }
  353|      2|#endif
  354|       |
  355|       |    /* Low priority. */
  356|      2|#ifndef FIPS_MODULE
  357|      2|    if (ctx->child_provider != NULL) {
  ------------------
  |  Branch (357:9): [True: 2, False: 0]
  ------------------
  358|      2|        ossl_child_prov_ctx_free(ctx->child_provider);
  359|      2|        ctx->child_provider = NULL;
  360|      2|    }
  361|      2|#endif
  362|       |
  363|      2|#ifndef FIPS_MODULE
  364|      2|    if (ctx->comp_methods != NULL) {
  ------------------
  |  Branch (364:9): [True: 2, False: 0]
  ------------------
  365|      2|        ossl_free_compression_methods_int(ctx->comp_methods);
  366|      2|        ctx->comp_methods = NULL;
  367|      2|    }
  368|      2|#endif
  369|       |
  370|      2|}
context.c:context_init:
   86|      4|{
   87|      4|    int exdata_done = 0;
   88|       |
   89|      4|    if (!CRYPTO_THREAD_init_local(&ctx->rcu_local_key, NULL))
  ------------------
  |  Branch (89:9): [True: 0, False: 4]
  ------------------
   90|      0|        return 0;
   91|       |
   92|      4|    ctx->lock = CRYPTO_THREAD_lock_new();
   93|      4|    if (ctx->lock == NULL)
  ------------------
  |  Branch (93:9): [True: 0, False: 4]
  ------------------
   94|      0|        goto err;
   95|       |
   96|      4|    ctx->rand_crngt_lock = CRYPTO_THREAD_lock_new();
   97|      4|    if (ctx->rand_crngt_lock == NULL)
  ------------------
  |  Branch (97:9): [True: 0, False: 4]
  ------------------
   98|      0|        goto err;
   99|       |
  100|       |    /* Initialize ex_data. */
  101|      4|    if (!ossl_do_ex_data_init(ctx))
  ------------------
  |  Branch (101:9): [True: 0, False: 4]
  ------------------
  102|      0|        goto err;
  103|      4|    exdata_done = 1;
  104|       |
  105|       |    /* P2. We want evp_method_store to be cleaned up before the provider store */
  106|      4|    ctx->evp_method_store = ossl_method_store_new(ctx);
  107|      4|    if (ctx->evp_method_store == NULL)
  ------------------
  |  Branch (107:9): [True: 0, False: 4]
  ------------------
  108|      0|        goto err;
  109|       |
  110|      4|#ifndef FIPS_MODULE
  111|       |    /* P2. Must be freed before the provider store is freed */
  112|      4|    ctx->provider_conf = ossl_prov_conf_ctx_new(ctx);
  113|      4|    if (ctx->provider_conf == NULL)
  ------------------
  |  Branch (113:9): [True: 0, False: 4]
  ------------------
  114|      0|        goto err;
  115|      4|#endif
  116|       |
  117|       |    /* P2. */
  118|      4|    ctx->drbg = ossl_rand_ctx_new(ctx);
  119|      4|    if (ctx->drbg == NULL)
  ------------------
  |  Branch (119:9): [True: 0, False: 4]
  ------------------
  120|      0|        goto err;
  121|       |
  122|      4|#ifndef FIPS_MODULE
  123|       |    /*
  124|       |     * P2. We want decoder_store/decoder_cache to be cleaned up before the
  125|       |     * provider store
  126|       |     */
  127|      4|    ctx->decoder_store = ossl_method_store_new(ctx);
  128|      4|    if (ctx->decoder_store == NULL)
  ------------------
  |  Branch (128:9): [True: 0, False: 4]
  ------------------
  129|      0|        goto err;
  130|      4|    ctx->decoder_cache = ossl_decoder_cache_new(ctx);
  131|      4|    if (ctx->decoder_cache == NULL)
  ------------------
  |  Branch (131:9): [True: 0, False: 4]
  ------------------
  132|      0|        goto err;
  133|       |
  134|       |    /* P2. We want encoder_store to be cleaned up before the provider store */
  135|      4|    ctx->encoder_store = ossl_method_store_new(ctx);
  136|      4|    if (ctx->encoder_store == NULL)
  ------------------
  |  Branch (136:9): [True: 0, False: 4]
  ------------------
  137|      0|        goto err;
  138|       |
  139|       |    /* P2. We want loader_store to be cleaned up before the provider store */
  140|      4|    ctx->store_loader_store = ossl_method_store_new(ctx);
  141|      4|    if (ctx->store_loader_store == NULL)
  ------------------
  |  Branch (141:9): [True: 0, False: 4]
  ------------------
  142|      0|        goto err;
  143|      4|#endif
  144|       |
  145|       |    /* P1. Needs to be freed before the child provider data is freed */
  146|      4|    ctx->provider_store = ossl_provider_store_new(ctx);
  147|      4|    if (ctx->provider_store == NULL)
  ------------------
  |  Branch (147:9): [True: 0, False: 4]
  ------------------
  148|      0|        goto err;
  149|       |
  150|       |    /* Default priority. */
  151|      4|    ctx->property_string_data = ossl_property_string_data_new(ctx);
  152|      4|    if (ctx->property_string_data == NULL)
  ------------------
  |  Branch (152:9): [True: 0, False: 4]
  ------------------
  153|      0|        goto err;
  154|       |
  155|      4|    ctx->namemap = ossl_stored_namemap_new(ctx);
  156|      4|    if (ctx->namemap == NULL)
  ------------------
  |  Branch (156:9): [True: 0, False: 4]
  ------------------
  157|      0|        goto err;
  158|       |
  159|      4|    ctx->property_defns = ossl_property_defns_new(ctx);
  160|      4|    if (ctx->property_defns == NULL)
  ------------------
  |  Branch (160:9): [True: 0, False: 4]
  ------------------
  161|      0|        goto err;
  162|       |
  163|      4|    ctx->global_properties = ossl_ctx_global_properties_new(ctx);
  164|      4|    if (ctx->global_properties == NULL)
  ------------------
  |  Branch (164:9): [True: 0, False: 4]
  ------------------
  165|      0|        goto err;
  166|       |
  167|      4|#ifndef FIPS_MODULE
  168|      4|    ctx->bio_core = ossl_bio_core_globals_new(ctx);
  169|      4|    if (ctx->bio_core == NULL)
  ------------------
  |  Branch (169:9): [True: 0, False: 4]
  ------------------
  170|      0|        goto err;
  171|      4|#endif
  172|       |
  173|      4|    ctx->drbg_nonce = ossl_prov_drbg_nonce_ctx_new(ctx);
  174|      4|    if (ctx->drbg_nonce == NULL)
  ------------------
  |  Branch (174:9): [True: 0, False: 4]
  ------------------
  175|      0|        goto err;
  176|       |
  177|      4|#ifndef FIPS_MODULE
  178|      4|    ctx->self_test_cb = ossl_self_test_set_callback_new(ctx);
  179|      4|    if (ctx->self_test_cb == NULL)
  ------------------
  |  Branch (179:9): [True: 0, False: 4]
  ------------------
  180|      0|        goto err;
  181|      4|    ctx->indicator_cb = ossl_indicator_set_callback_new(ctx);
  182|      4|    if (ctx->indicator_cb == NULL)
  ------------------
  |  Branch (182:9): [True: 0, False: 4]
  ------------------
  183|      0|        goto err;
  184|      4|#endif
  185|       |
  186|       |#ifdef FIPS_MODULE
  187|       |    ctx->thread_event_handler = ossl_thread_event_ctx_new(ctx);
  188|       |    if (ctx->thread_event_handler == NULL)
  189|       |        goto err;
  190|       |
  191|       |    ctx->fips_prov = ossl_fips_prov_ossl_ctx_new(ctx);
  192|       |    if (ctx->fips_prov == NULL)
  193|       |        goto err;
  194|       |#endif
  195|       |
  196|      4|#ifndef OPENSSL_NO_THREAD_POOL
  197|      4|    ctx->threads = ossl_threads_ctx_new(ctx);
  198|      4|    if (ctx->threads == NULL)
  ------------------
  |  Branch (198:9): [True: 0, False: 4]
  ------------------
  199|      0|        goto err;
  200|      4|#endif
  201|       |
  202|       |    /* Low priority. */
  203|      4|#ifndef FIPS_MODULE
  204|      4|    ctx->child_provider = ossl_child_prov_ctx_new(ctx);
  205|      4|    if (ctx->child_provider == NULL)
  ------------------
  |  Branch (205:9): [True: 0, False: 4]
  ------------------
  206|      0|        goto err;
  207|      4|#endif
  208|       |
  209|       |    /* Everything depends on properties, so we also pre-initialise that */
  210|      4|    if (!ossl_property_parse_init(ctx))
  ------------------
  |  Branch (210:9): [True: 0, False: 4]
  ------------------
  211|      0|        goto err;
  212|       |
  213|      4|#ifndef FIPS_MODULE
  214|      4|    ctx->comp_methods = ossl_load_builtin_compressions();
  215|      4|#endif
  216|       |
  217|      4|    return 1;
  218|       |
  219|      0| err:
  220|      0|    context_deinit_objs(ctx);
  221|       |
  222|      0|    if (exdata_done)
  ------------------
  |  Branch (222:9): [True: 0, False: 0]
  ------------------
  223|      0|        ossl_crypto_cleanup_all_ex_data_int(ctx);
  224|       |
  225|      0|    CRYPTO_THREAD_lock_free(ctx->rand_crngt_lock);
  226|      0|    CRYPTO_THREAD_lock_free(ctx->lock);
  227|      0|    CRYPTO_THREAD_cleanup_local(&ctx->rcu_local_key);
  228|      0|    memset(ctx, '\0', sizeof(*ctx));
  229|      0|    return 0;
  230|      4|}
context.c:default_context_do_init:
  400|      2|{
  401|      2|    if (!CRYPTO_THREAD_init_local(&default_context_thread_local, NULL))
  ------------------
  |  Branch (401:9): [True: 0, False: 2]
  ------------------
  402|      0|        goto err;
  403|       |
  404|      2|    if (!context_init(&default_context_int))
  ------------------
  |  Branch (404:9): [True: 0, False: 2]
  ------------------
  405|      0|        goto deinit_thread;
  406|       |
  407|      2|    default_context_inited = 1;
  408|      2|    return 1;
  409|       |
  410|      0|deinit_thread:
  411|      0|    CRYPTO_THREAD_cleanup_local(&default_context_thread_local);
  412|      0|err:
  413|      0|    return 0;
  414|      0|}
context.c:get_default_context:
  434|     32|{
  435|     32|    OSSL_LIB_CTX *current_defctx = get_thread_default_context();
  436|       |
  437|     32|    if (current_defctx == NULL)
  ------------------
  |  Branch (437:9): [True: 32, False: 0]
  ------------------
  438|     32|        current_defctx = &default_context_int;
  439|     32|    return current_defctx;
  440|     32|}
context.c:get_thread_default_context:
  426|     32|{
  427|     32|    if (!RUN_ONCE(&default_context_init, default_context_do_init))
  ------------------
  |  |  130|     32|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 32, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (427:9): [True: 0, False: 32]
  ------------------
  428|      0|        return NULL;
  429|       |
  430|     32|    return CRYPTO_THREAD_get_local(&default_context_thread_local);
  431|     32|}

ossl_stored_namemap_new:
   65|      4|{
   66|      4|    OSSL_NAMEMAP *namemap = ossl_namemap_new();
   67|       |
   68|      4|    if (namemap != NULL)
  ------------------
  |  Branch (68:9): [True: 4, False: 0]
  ------------------
   69|      4|        namemap->stored = 1;
   70|       |
   71|      4|    return namemap;
   72|      4|}
ossl_stored_namemap_free:
   75|      2|{
   76|      2|    OSSL_NAMEMAP *namemap = vnamemap;
   77|       |
   78|      2|    if (namemap != NULL) {
  ------------------
  |  Branch (78:9): [True: 2, False: 0]
  ------------------
   79|       |        /* Pretend it isn't stored, or ossl_namemap_free() will do nothing */
   80|      2|        namemap->stored = 0;
   81|      2|        ossl_namemap_free(namemap);
   82|      2|    }
   83|      2|}
ossl_namemap_new:
  512|      4|{
  513|      4|    OSSL_NAMEMAP *namemap;
  514|       |
  515|      4|    if ((namemap = OPENSSL_zalloc(sizeof(*namemap))) != NULL
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (515:9): [True: 4, False: 0]
  ------------------
  516|      4|        && (namemap->lock = CRYPTO_THREAD_lock_new()) != NULL
  ------------------
  |  Branch (516:12): [True: 4, False: 0]
  ------------------
  517|      4|        && (namemap->namenum =
  ------------------
  |  Branch (517:12): [True: 4, False: 0]
  ------------------
  518|      4|            lh_NAMENUM_ENTRY_new(namenum_hash, namenum_cmp)) != NULL)
  519|      4|        return namemap;
  520|       |
  521|      0|    ossl_namemap_free(namemap);
  522|      0|    return NULL;
  523|      4|}
ossl_namemap_free:
  526|      2|{
  527|      2|    if (namemap == NULL || namemap->stored)
  ------------------
  |  Branch (527:9): [True: 0, False: 2]
  |  Branch (527:28): [True: 0, False: 2]
  ------------------
  528|      0|        return;
  529|       |
  530|      2|    lh_NAMENUM_ENTRY_doall(namemap->namenum, namenum_free);
  531|      2|    lh_NAMENUM_ENTRY_free(namemap->namenum);
  532|       |
  533|      2|    CRYPTO_THREAD_lock_free(namemap->lock);
  534|      2|    OPENSSL_free(namemap);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  535|      2|}

ossl_err_load_CRYPTO_strings:
   82|      2|{
   83|      2|#ifndef OPENSSL_NO_ERR
   84|      2|    if (ERR_reason_error_string(CRYPTO_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (84:9): [True: 2, False: 0]
  ------------------
   85|      2|        ERR_load_strings_const(CRYPTO_str_reasons);
   86|      2|#endif
   87|      2|    return 1;
   88|      2|}

OPENSSL_cpuid_setup:
   96|      4|{
   97|      4|    static int trigger = 0;
   98|      4|    IA32CAP OPENSSL_ia32_cpuid(unsigned int *);
   99|      4|    IA32CAP vec;
  100|      4|    const variant_char *env;
  101|       |
  102|      4|    if (trigger)
  ------------------
  |  Branch (102:9): [True: 2, False: 2]
  ------------------
  103|      2|        return;
  104|       |
  105|      2|    trigger = 1;
  106|      2|    if ((env = ossl_getenv("OPENSSL_ia32cap")) != NULL) {
  ------------------
  |  |   47|      2|#   define ossl_getenv getenv
  ------------------
  |  Branch (106:9): [True: 0, False: 2]
  ------------------
  107|      0|        int off = (env[0] == '~') ? 1 : 0;
  ------------------
  |  Branch (107:19): [True: 0, False: 0]
  ------------------
  108|       |
  109|      0|        vec = ossl_strtouint64(env + off);
  110|       |
  111|      0|        if (off) {
  ------------------
  |  Branch (111:13): [True: 0, False: 0]
  ------------------
  112|      0|            IA32CAP mask = vec;
  113|      0|            vec = OPENSSL_ia32_cpuid(OPENSSL_ia32cap_P) & ~mask;
  114|      0|            if (mask & (1<<24)) {
  ------------------
  |  Branch (114:17): [True: 0, False: 0]
  ------------------
  115|       |                /*
  116|       |                 * User disables FXSR bit, mask even other capabilities
  117|       |                 * that operate exclusively on XMM, so we don't have to
  118|       |                 * double-check all the time. We mask PCLMULQDQ, AMD XOP,
  119|       |                 * AES-NI and AVX. Formally speaking we don't have to
  120|       |                 * do it in x86_64 case, but we can safely assume that
  121|       |                 * x86_64 users won't actually flip this flag.
  122|       |                 */
  123|      0|                vec &= ~((IA32CAP)(1<<1|1<<11|1<<25|1<<28) << 32);
  124|      0|            }
  125|      0|        } else if (env[0] == ':') {
  ------------------
  |  Branch (125:20): [True: 0, False: 0]
  ------------------
  126|      0|            vec = OPENSSL_ia32_cpuid(OPENSSL_ia32cap_P);
  127|      0|        }
  128|       |
  129|      0|        if ((env = ossl_strchr(env, ':')) != NULL) {
  ------------------
  |  Branch (129:13): [True: 0, False: 0]
  ------------------
  130|      0|            IA32CAP vecx;
  131|       |
  132|      0|            env++;
  133|      0|            off = (env[0] == '~') ? 1 : 0;
  ------------------
  |  Branch (133:19): [True: 0, False: 0]
  ------------------
  134|      0|            vecx = ossl_strtouint64(env + off);
  135|      0|            if (off) {
  ------------------
  |  Branch (135:17): [True: 0, False: 0]
  ------------------
  136|      0|                OPENSSL_ia32cap_P[2] &= ~(unsigned int)vecx;
  137|      0|                OPENSSL_ia32cap_P[3] &= ~(unsigned int)(vecx >> 32);
  138|      0|            } else {
  139|      0|                OPENSSL_ia32cap_P[2] = (unsigned int)vecx;
  140|      0|                OPENSSL_ia32cap_P[3] = (unsigned int)(vecx >> 32);
  141|      0|            }
  142|      0|        } else {
  143|      0|            OPENSSL_ia32cap_P[2] = 0;
  144|      0|            OPENSSL_ia32cap_P[3] = 0;
  145|      0|        }
  146|      2|    } else {
  147|      2|        vec = OPENSSL_ia32_cpuid(OPENSSL_ia32cap_P);
  148|      2|    }
  149|       |
  150|       |    /*
  151|       |     * |(1<<10) sets a reserved bit to signal that variable
  152|       |     * was initialized already... This is to avoid interference
  153|       |     * with cpuid snippets in ELF .init segment.
  154|       |     */
  155|      2|    OPENSSL_ia32cap_P[0] = (unsigned int)vec | (1 << 10);
  156|      2|    OPENSSL_ia32cap_P[1] = (unsigned int)(vec >> 32);
  157|      2|}

ossl_err_load_CRMF_strings:
   65|      2|{
   66|      2|# ifndef OPENSSL_NO_ERR
   67|      2|    if (ERR_reason_error_string(CRMF_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (67:9): [True: 2, False: 0]
  ------------------
   68|      2|        ERR_load_strings_const(CRMF_str_reasons);
   69|      2|# endif
   70|      2|    return 1;
   71|      2|}

ossl_err_load_CT_strings:
   52|      2|{
   53|      2|# ifndef OPENSSL_NO_ERR
   54|      2|    if (ERR_reason_error_string(CT_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (54:9): [True: 2, False: 0]
  ------------------
   55|      2|        ERR_load_strings_const(CT_str_reasons);
   56|      2|# endif
   57|      2|    return 1;
   58|      2|}

ossl_isdigit:
  270|     10|{
  271|     10|    int a = ossl_toascii(c);
  ------------------
  |  |   56|     10|#  define ossl_toascii(c)       (c)
  ------------------
  272|       |
  273|     10|    return ASCII_IS_DIGIT(a);
  ------------------
  |  |  265|     10|#define ASCII_IS_DIGIT(c)   (c >= 0x30 && c <= 0x39)
  |  |  ------------------
  |  |  |  Branch (265:30): [True: 10, False: 0]
  |  |  |  Branch (265:43): [True: 0, False: 10]
  |  |  ------------------
  ------------------
  274|     10|}
ossl_tolower:
  297|  20.3k|{
  298|  20.3k|    int a = ossl_toascii(c);
  ------------------
  |  |   56|  20.3k|#  define ossl_toascii(c)       (c)
  ------------------
  299|       |
  300|  20.3k|    return ASCII_IS_UPPER(a) ? c ^ case_change : c;
  ------------------
  |  |  266|  20.3k|#define ASCII_IS_UPPER(c)   (c >= 0x41 && c <= 0x5A)
  |  |  ------------------
  |  |  |  Branch (266:30): [True: 12.1k, False: 8.20k]
  |  |  |  Branch (266:43): [True: 3.01k, False: 9.15k]
  |  |  ------------------
  ------------------
  301|  20.3k|}

ossl_err_load_DH_strings:
   68|      2|{
   69|      2|# ifndef OPENSSL_NO_ERR
   70|      2|    if (ERR_reason_error_string(DH_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (70:9): [True: 2, False: 0]
  ------------------
   71|      2|        ERR_load_strings_const(DH_str_reasons);
   72|      2|# endif
   73|      2|    return 1;
   74|      2|}

ossl_err_load_DSA_strings:
   46|      2|{
   47|      2|# ifndef OPENSSL_NO_ERR
   48|      2|    if (ERR_reason_error_string(DSA_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (48:9): [True: 2, False: 0]
  ------------------
   49|      2|        ERR_load_strings_const(DSA_str_reasons);
   50|      2|# endif
   51|      2|    return 1;
   52|      2|}

ossl_err_load_DSO_strings:
   50|      2|{
   51|      2|#ifndef OPENSSL_NO_ERR
   52|      2|    if (ERR_reason_error_string(DSO_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (52:9): [True: 2, False: 0]
  ------------------
   53|      2|        ERR_load_strings_const(DSO_str_reasons);
   54|      2|#endif
   55|      2|    return 1;
   56|      2|}

ossl_err_load_EC_strings:
  127|      2|{
  128|      2|# ifndef OPENSSL_NO_ERR
  129|      2|    if (ERR_reason_error_string(EC_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (129:9): [True: 2, False: 0]
  ------------------
  130|      2|        ERR_load_strings_const(EC_str_reasons);
  131|      2|# endif
  132|      2|    return 1;
  133|      2|}

ossl_decoder_store_cache_flush:
  432|      2|{
  433|      2|    OSSL_METHOD_STORE *store = get_decoder_store(libctx);
  434|       |
  435|      2|    if (store != NULL)
  ------------------
  |  Branch (435:9): [True: 2, False: 0]
  ------------------
  436|      2|        return ossl_method_store_cache_flush_all(store);
  437|      0|    return 1;
  438|      2|}
decoder_meth.c:get_decoder_store:
  102|      2|{
  103|      2|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_STORE_INDEX);
  ------------------
  |  |  109|      2|# define OSSL_LIB_CTX_DECODER_STORE_INDEX           11
  ------------------
  104|      2|}

ossl_decoder_cache_new:
  683|      4|{
  684|      4|    DECODER_CACHE *cache = OPENSSL_malloc(sizeof(*cache));
  ------------------
  |  |  102|      4|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  685|       |
  686|      4|    if (cache == NULL)
  ------------------
  |  Branch (686:9): [True: 0, False: 4]
  ------------------
  687|      0|        return NULL;
  688|       |
  689|      4|    cache->lock = CRYPTO_THREAD_lock_new();
  690|      4|    if (cache->lock == NULL) {
  ------------------
  |  Branch (690:9): [True: 0, False: 4]
  ------------------
  691|      0|        OPENSSL_free(cache);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  692|      0|        return NULL;
  693|      0|    }
  694|      4|    cache->hashtable = lh_DECODER_CACHE_ENTRY_new(decoder_cache_entry_hash,
  695|      4|                                                  decoder_cache_entry_cmp);
  696|      4|    if (cache->hashtable == NULL) {
  ------------------
  |  Branch (696:9): [True: 0, False: 4]
  ------------------
  697|      0|        CRYPTO_THREAD_lock_free(cache->lock);
  698|      0|        OPENSSL_free(cache);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  699|      0|        return NULL;
  700|      0|    }
  701|       |
  702|      4|    return cache;
  703|      4|}
ossl_decoder_cache_free:
  706|      2|{
  707|      2|    DECODER_CACHE *cache = (DECODER_CACHE *)vcache;
  708|       |
  709|      2|    lh_DECODER_CACHE_ENTRY_doall(cache->hashtable, decoder_cache_entry_free);
  710|      2|    lh_DECODER_CACHE_ENTRY_free(cache->hashtable);
  711|      2|    CRYPTO_THREAD_lock_free(cache->lock);
  712|      2|    OPENSSL_free(cache);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  713|      2|}
ossl_decoder_cache_flush:
  720|      4|{
  721|      4|    DECODER_CACHE *cache
  722|      4|        = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_CACHE_INDEX);
  ------------------
  |  |  118|      4|# define OSSL_LIB_CTX_DECODER_CACHE_INDEX           20
  ------------------
  723|       |
  724|      4|    if (cache == NULL)
  ------------------
  |  Branch (724:9): [True: 2, False: 2]
  ------------------
  725|      2|        return 0;
  726|       |
  727|       |
  728|      2|    if (!CRYPTO_THREAD_write_lock(cache->lock)) {
  ------------------
  |  Branch (728:9): [True: 0, False: 2]
  ------------------
  729|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  730|      0|        return 0;
  731|      0|    }
  732|       |
  733|      2|    lh_DECODER_CACHE_ENTRY_doall(cache->hashtable, decoder_cache_entry_free);
  734|      2|    lh_DECODER_CACHE_ENTRY_flush(cache->hashtable);
  735|       |
  736|      2|    CRYPTO_THREAD_unlock(cache->lock);
  737|      2|    return 1;
  738|      2|}

ossl_encoder_store_cache_flush:
  441|      2|{
  442|      2|    OSSL_METHOD_STORE *store = get_encoder_store(libctx);
  443|       |
  444|      2|    if (store != NULL)
  ------------------
  |  Branch (444:9): [True: 2, False: 0]
  ------------------
  445|      2|        return ossl_method_store_cache_flush_all(store);
  446|      0|    return 1;
  447|      2|}
encoder_meth.c:get_encoder_store:
  102|      2|{
  103|      2|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_ENCODER_STORE_INDEX);
  ------------------
  |  |  108|      2|# define OSSL_LIB_CTX_ENCODER_STORE_INDEX           10
  ------------------
  104|      2|}

ossl_err_load_ENGINE_strings:
   85|      2|{
   86|      2|# ifndef OPENSSL_NO_ERR
   87|      2|    if (ERR_reason_error_string(ENGINE_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (87:9): [True: 2, False: 0]
  ------------------
   88|      2|        ERR_load_strings_const(ENGINE_str_reasons);
   89|      2|# endif
   90|      2|    return 1;
   91|      2|}

engine_cleanup_int:
  176|      2|{
  177|      2|    if (int_cleanup_check(0)) {
  ------------------
  |  Branch (177:9): [True: 0, False: 2]
  ------------------
  178|      0|        sk_ENGINE_CLEANUP_ITEM_pop_free(cleanup_stack,
  179|      0|                                        engine_cleanup_cb_free);
  180|      0|        cleanup_stack = NULL;
  181|      0|    }
  182|      2|    CRYPTO_THREAD_lock_free(global_engine_lock);
  183|      2|    global_engine_lock = NULL;
  184|      2|}
eng_lib.c:int_cleanup_check:
  119|      2|{
  120|      2|    if (cleanup_stack)
  ------------------
  |  Branch (120:9): [True: 0, False: 2]
  ------------------
  121|      0|        return 1;
  122|      2|    if (!create)
  ------------------
  |  Branch (122:9): [True: 2, False: 0]
  ------------------
  123|      2|        return 0;
  124|      0|    cleanup_stack = sk_ENGINE_CLEANUP_ITEM_new_null();
  125|      0|    return (cleanup_stack ? 1 : 0);
  ------------------
  |  Branch (125:13): [True: 0, False: 0]
  ------------------
  126|      2|}

OSSL_ERR_STATE_free:
  202|      2|{
  203|      2|    int i;
  204|       |
  205|      2|    if (state == NULL)
  ------------------
  |  Branch (205:9): [True: 0, False: 2]
  ------------------
  206|      0|        return;
  207|     34|    for (i = 0; i < ERR_NUM_ERRORS; i++) {
  ------------------
  |  |   55|     34|#  define ERR_NUM_ERRORS  16
  ------------------
  |  Branch (207:17): [True: 32, False: 2]
  ------------------
  208|     32|        err_clear(state, i, 1);
  209|     32|    }
  210|      2|    CRYPTO_free(state, OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  ------------------
                  CRYPTO_free(state, OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  ------------------
  211|      2|}
err_cleanup:
  233|      2|{
  234|      2|    if (set_err_thread_local != 0)
  ------------------
  |  Branch (234:9): [True: 2, False: 0]
  ------------------
  235|      2|        CRYPTO_THREAD_cleanup_local(&err_thread_local);
  236|      2|    CRYPTO_THREAD_lock_free(err_string_lock);
  237|      2|    err_string_lock = NULL;
  238|      2|#ifndef OPENSSL_NO_ERR
  239|      2|    lh_ERR_STRING_DATA_free(int_error_hash);
  ------------------
  |  |  376|      2|#define lh_ERR_STRING_DATA_free(lh) OPENSSL_LH_free(ossl_check_ERR_STRING_DATA_lh_type(lh))
  ------------------
  240|      2|    int_error_hash = NULL;
  241|      2|#endif
  242|      2|}
ossl_err_load_ERR_strings:
  272|     72|{
  273|     72|#ifndef OPENSSL_NO_ERR
  274|     72|    if (!RUN_ONCE(&err_string_init, do_err_strings_init))
  ------------------
  |  |  130|     72|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 72, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (274:9): [True: 0, False: 72]
  ------------------
  275|      0|        return 0;
  276|       |
  277|     72|    err_load_strings(ERR_str_libraries);
  278|     72|    err_load_strings(ERR_str_reasons);
  279|     72|#endif
  280|     72|    return 1;
  281|     72|}
ERR_load_strings_const:
  297|     70|{
  298|     70|#ifndef OPENSSL_NO_ERR
  299|     70|    if (ossl_err_load_ERR_strings() == 0)
  ------------------
  |  Branch (299:9): [True: 0, False: 70]
  ------------------
  300|      0|        return 0;
  301|     70|    err_load_strings(str);
  302|     70|#endif
  303|       |
  304|     70|    return 1;
  305|     70|}
ERR_clear_error:
  335|      2|{
  336|      2|    int i;
  337|      2|    ERR_STATE *es;
  338|       |
  339|      2|    es = ossl_err_get_state_int();
  340|      2|    if (es == NULL)
  ------------------
  |  Branch (340:9): [True: 0, False: 2]
  ------------------
  341|      0|        return;
  342|       |
  343|     34|    for (i = 0; i < ERR_NUM_ERRORS; i++) {
  ------------------
  |  |   55|     34|#  define ERR_NUM_ERRORS  16
  ------------------
  |  Branch (343:17): [True: 32, False: 2]
  ------------------
  344|     32|        err_clear(es, i, 0);
  345|     32|    }
  346|      2|    es->top = es->bottom = 0;
  347|      2|}
ERR_peek_last_error:
  410|      4|{
  411|      4|    return get_error_values(EV_PEEK_LAST, NULL, NULL, NULL, NULL, NULL);
  412|      4|}
ERR_reason_error_string:
  613|     70|{
  614|     70|#ifndef OPENSSL_NO_ERR
  615|     70|    ERR_STRING_DATA d, *p = NULL;
  616|     70|    unsigned long l, r;
  617|       |
  618|     70|    if (!RUN_ONCE(&err_string_init, do_err_strings_init)) {
  ------------------
  |  |  130|     70|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 70, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (618:9): [True: 0, False: 70]
  ------------------
  619|      0|        return NULL;
  620|      0|    }
  621|       |
  622|       |    /*
  623|       |     * ERR_reason_error_string() can't safely return system error strings,
  624|       |     * since openssl_strerror_r() needs a buffer for thread safety, and we
  625|       |     * haven't got one that would serve any sensible purpose.
  626|       |     */
  627|     70|    if (ERR_SYSTEM_ERROR(e))
  ------------------
  |  |  239|     70|# define ERR_SYSTEM_ERROR(errcode)      (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  218|     70|# define ERR_SYSTEM_FLAG                ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (239:41): [True: 0, False: 70]
  |  |  ------------------
  ------------------
  628|      0|        return NULL;
  629|       |
  630|     70|    l = ERR_GET_LIB(e);
  631|     70|    r = ERR_GET_REASON(e);
  632|     70|    d.error = ERR_PACK(l, 0, r);
  ------------------
  |  |  279|     70|    ( (((unsigned long)(lib)    & ERR_LIB_MASK   ) << ERR_LIB_OFFSET) | \
  |  |  ------------------
  |  |  |  |  227|     70|# define ERR_LIB_MASK                   0xFF
  |  |  ------------------
  |  |                   ( (((unsigned long)(lib)    & ERR_LIB_MASK   ) << ERR_LIB_OFFSET) | \
  |  |  ------------------
  |  |  |  |  226|     70|# define ERR_LIB_OFFSET                 23L
  |  |  ------------------
  |  |  280|     70|      (((unsigned long)(reason) & ERR_REASON_MASK)) )
  |  |  ------------------
  |  |  |  |  230|     70|# define ERR_REASON_MASK                0X7FFFFF
  |  |  ------------------
  ------------------
  633|     70|    p = int_err_get_item(&d);
  634|     70|    if (p == NULL) {
  ------------------
  |  Branch (634:9): [True: 70, False: 0]
  ------------------
  635|     70|        d.error = ERR_PACK(0, 0, r);
  ------------------
  |  |  279|     70|    ( (((unsigned long)(lib)    & ERR_LIB_MASK   ) << ERR_LIB_OFFSET) | \
  |  |  ------------------
  |  |  |  |  227|     70|# define ERR_LIB_MASK                   0xFF
  |  |  ------------------
  |  |                   ( (((unsigned long)(lib)    & ERR_LIB_MASK   ) << ERR_LIB_OFFSET) | \
  |  |  ------------------
  |  |  |  |  226|     70|# define ERR_LIB_OFFSET                 23L
  |  |  ------------------
  |  |  280|     70|      (((unsigned long)(reason) & ERR_REASON_MASK)) )
  |  |  ------------------
  |  |  |  |  230|     70|# define ERR_REASON_MASK                0X7FFFFF
  |  |  ------------------
  ------------------
  636|     70|        p = int_err_get_item(&d);
  637|     70|    }
  638|     70|    return ((p == NULL) ? NULL : p->string);
  ------------------
  |  Branch (638:13): [True: 70, False: 0]
  ------------------
  639|       |#else
  640|       |    return NULL;
  641|       |#endif
  642|     70|}
ossl_err_get_state_int:
  673|     28|{
  674|     28|    ERR_STATE *state;
  675|     28|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|     28|# define get_last_sys_error()    errno
  ------------------
  676|       |
  677|     28|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|     28|# define OPENSSL_INIT_BASE_ONLY              0x00040000L
  ------------------
  |  Branch (677:9): [True: 0, False: 28]
  ------------------
  678|      0|        return NULL;
  679|       |
  680|     28|    if (!RUN_ONCE(&err_init, err_do_init))
  ------------------
  |  |  130|     28|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 28, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (680:9): [True: 0, False: 28]
  ------------------
  681|      0|        return NULL;
  682|       |
  683|     28|    state = CRYPTO_THREAD_get_local(&err_thread_local);
  684|     28|    if (state == (ERR_STATE*)-1)
  ------------------
  |  Branch (684:9): [True: 0, False: 28]
  ------------------
  685|      0|        return NULL;
  686|       |
  687|     28|    if (state == NULL) {
  ------------------
  |  Branch (687:9): [True: 2, False: 26]
  ------------------
  688|      2|        if (!CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)-1))
  ------------------
  |  Branch (688:13): [True: 0, False: 2]
  ------------------
  689|      0|            return NULL;
  690|       |
  691|      2|        state = OSSL_ERR_STATE_new();
  692|      2|        if (state == NULL) {
  ------------------
  |  Branch (692:13): [True: 0, False: 2]
  ------------------
  693|      0|            CRYPTO_THREAD_set_local(&err_thread_local, NULL);
  694|      0|            return NULL;
  695|      0|        }
  696|       |
  697|      2|        if (!ossl_init_thread_start(NULL, NULL, err_delete_thread_state)
  ------------------
  |  Branch (697:13): [True: 0, False: 2]
  ------------------
  698|      2|                || !CRYPTO_THREAD_set_local(&err_thread_local, state)) {
  ------------------
  |  Branch (698:20): [True: 0, False: 2]
  ------------------
  699|      0|            OSSL_ERR_STATE_free(state);
  700|      0|            CRYPTO_THREAD_set_local(&err_thread_local, NULL);
  701|      0|            return NULL;
  702|      0|        }
  703|       |
  704|       |        /* Ignore failures from these */
  705|      2|        OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
  ------------------
  |  |  463|      2|# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS    0x00000002L
  ------------------
  706|      2|    }
  707|       |
  708|     28|    set_sys_error(saveerrno);
  ------------------
  |  |   32|     28|# define set_sys_error(e)        errno=(e)
  ------------------
  709|     28|    return state;
  710|     28|}
err_shelve_state:
  725|      2|{
  726|      2|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|      2|# define get_last_sys_error()    errno
  ------------------
  727|       |
  728|       |    /*
  729|       |     * Note, at present our only caller is OPENSSL_init_crypto(), indirectly
  730|       |     * via ossl_init_load_crypto_nodelete(), by which point the requested
  731|       |     * "base" initialization has already been performed, so the below call is a
  732|       |     * NOOP, that re-enters OPENSSL_init_crypto() only to quickly return.
  733|       |     *
  734|       |     * If are no other valid callers of this function, the call below can be
  735|       |     * removed, avoiding the re-entry into OPENSSL_init_crypto().  If there are
  736|       |     * potential uses that are not from inside OPENSSL_init_crypto(), then this
  737|       |     * call is needed, but some care is required to make sure that the re-entry
  738|       |     * remains a NOOP.
  739|       |     */
  740|      2|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|      2|# define OPENSSL_INIT_BASE_ONLY              0x00040000L
  ------------------
  |  Branch (740:9): [True: 0, False: 2]
  ------------------
  741|      0|        return 0;
  742|       |
  743|      2|    if (!RUN_ONCE(&err_init, err_do_init))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (743:9): [True: 0, False: 2]
  ------------------
  744|      0|        return 0;
  745|       |
  746|      2|    *state = CRYPTO_THREAD_get_local(&err_thread_local);
  747|      2|    if (!CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)-1))
  ------------------
  |  Branch (747:9): [True: 0, False: 2]
  ------------------
  748|      0|        return 0;
  749|       |
  750|      2|    set_sys_error(saveerrno);
  ------------------
  |  |   32|      2|# define set_sys_error(e)        errno=(e)
  ------------------
  751|      2|    return 1;
  752|      2|}
err_unshelve_state:
  759|      2|{
  760|      2|    if (state != (void*)-1)
  ------------------
  |  Branch (760:9): [True: 2, False: 0]
  ------------------
  761|      2|        CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)state);
  762|      2|}
ERR_get_next_error_library:
  765|      2|{
  766|      2|    int ret;
  767|       |
  768|      2|    if (!RUN_ONCE(&err_string_init, do_err_strings_init))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (768:9): [True: 0, False: 2]
  ------------------
  769|      0|        return 0;
  770|       |
  771|      2|    if (!CRYPTO_THREAD_write_lock(err_string_lock))
  ------------------
  |  Branch (771:9): [True: 0, False: 2]
  ------------------
  772|      0|        return 0;
  773|      2|    ret = int_err_library_number++;
  774|      2|    CRYPTO_THREAD_unlock(err_string_lock);
  775|      2|    return ret;
  776|      2|}
err.c:do_err_strings_init:
  214|      2|{
  215|      2|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|      2|# define OPENSSL_INIT_BASE_ONLY              0x00040000L
  ------------------
  |  Branch (215:9): [True: 0, False: 2]
  ------------------
  216|      0|        return 0;
  217|      2|    err_string_lock = CRYPTO_THREAD_lock_new();
  218|      2|    if (err_string_lock == NULL)
  ------------------
  |  Branch (218:9): [True: 0, False: 2]
  ------------------
  219|      0|        return 0;
  220|      2|#ifndef OPENSSL_NO_ERR
  221|      2|    int_error_hash = lh_ERR_STRING_DATA_new(err_string_data_hash,
  ------------------
  |  |  375|      2|#define lh_ERR_STRING_DATA_new(hfn, cmp) ((LHASH_OF(ERR_STRING_DATA) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_ERR_STRING_DATA_lh_hashfunc_type(hfn), ossl_check_ERR_STRING_DATA_lh_compfunc_type(cmp)), lh_ERR_STRING_DATA_hash_thunk, lh_ERR_STRING_DATA_comp_thunk, lh_ERR_STRING_DATA_doall_thunk, lh_ERR_STRING_DATA_doall_arg_thunk))
  ------------------
  222|      2|                                            err_string_data_cmp);
  223|      2|    if (int_error_hash == NULL) {
  ------------------
  |  Branch (223:9): [True: 0, False: 2]
  ------------------
  224|      0|        CRYPTO_THREAD_lock_free(err_string_lock);
  225|      0|        err_string_lock = NULL;
  226|      0|        return 0;
  227|      0|    }
  228|      2|#endif
  229|      2|    return 1;
  230|      2|}
err.c:err_string_data_hash:
  172|  9.54k|{
  173|  9.54k|    unsigned long ret, l;
  174|       |
  175|  9.54k|    l = a->error;
  176|  9.54k|    ret = l ^ ERR_GET_LIB(l);
  177|  9.54k|    return (ret ^ ret % 19 * 13);
  178|  9.54k|}
err.c:err_string_data_cmp:
  182|  6.15k|{
  183|  6.15k|    if (a->error == b->error)
  ------------------
  |  Branch (183:9): [True: 5.74k, False: 408]
  ------------------
  184|  5.74k|        return 0;
  185|    408|    return a->error > b->error ? 1 : -1;
  ------------------
  |  Branch (185:12): [True: 222, False: 186]
  ------------------
  186|  6.15k|}
err.c:err_load_strings:
  260|    214|{
  261|    214|    if (!CRYPTO_THREAD_write_lock(err_string_lock))
  ------------------
  |  Branch (261:9): [True: 0, False: 214]
  ------------------
  262|      0|        return 0;
  263|  9.62k|    for (; str->error; str++)
  ------------------
  |  Branch (263:12): [True: 9.40k, False: 214]
  ------------------
  264|  9.40k|        (void)lh_ERR_STRING_DATA_insert(int_error_hash,
  ------------------
  |  |  378|  9.62k|#define lh_ERR_STRING_DATA_insert(lh, ptr) ((ERR_STRING_DATA *)OPENSSL_LH_insert(ossl_check_ERR_STRING_DATA_lh_type(lh), ossl_check_ERR_STRING_DATA_lh_plain_type(ptr)))
  ------------------
  265|    214|                                       (ERR_STRING_DATA *)str);
  266|    214|    CRYPTO_THREAD_unlock(err_string_lock);
  267|    214|    return 1;
  268|    214|}
err.c:get_error_values:
  448|      4|{
  449|      4|    int i = 0;
  450|      4|    ERR_STATE *es;
  451|      4|    unsigned long ret;
  452|       |
  453|      4|    es = ossl_err_get_state_int();
  454|      4|    if (es == NULL)
  ------------------
  |  Branch (454:9): [True: 0, False: 4]
  ------------------
  455|      0|        return 0;
  456|       |
  457|       |    /*
  458|       |     * Clear anything that should have been cleared earlier. We do this
  459|       |     * here because this doesn't have constant-time issues.
  460|       |     */
  461|      4|    while (es->bottom != es->top) {
  ------------------
  |  Branch (461:12): [True: 4, False: 0]
  ------------------
  462|      4|        if (es->err_flags[es->top] & ERR_FLAG_CLEAR) {
  ------------------
  |  |   53|      4|#  define ERR_FLAG_CLEAR          0x02
  ------------------
  |  Branch (462:13): [True: 0, False: 4]
  ------------------
  463|      0|            err_clear(es, es->top, 0);
  464|      0|            es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   55|      0|#  define ERR_NUM_ERRORS  16
  ------------------
  |  Branch (464:23): [True: 0, False: 0]
  ------------------
  465|      0|            continue;
  466|      0|        }
  467|      4|        i = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   55|      4|#  define ERR_NUM_ERRORS  16
  ------------------
  468|      4|        if (es->err_flags[i] & ERR_FLAG_CLEAR) {
  ------------------
  |  |   53|      4|#  define ERR_FLAG_CLEAR          0x02
  ------------------
  |  Branch (468:13): [True: 0, False: 4]
  ------------------
  469|      0|            es->bottom = i;
  470|      0|            err_clear(es, es->bottom, 0);
  471|      0|            continue;
  472|      0|        }
  473|      4|        break;
  474|      4|    }
  475|       |
  476|       |    /* If everything has been cleared, the stack is empty. */
  477|      4|    if (es->bottom == es->top)
  ------------------
  |  Branch (477:9): [True: 0, False: 4]
  ------------------
  478|      0|        return 0;
  479|       |
  480|       |    /* Which error, the top of stack (latest one) or the first one? */
  481|      4|    if (g == EV_PEEK_LAST)
  ------------------
  |  Branch (481:9): [True: 4, False: 0]
  ------------------
  482|      4|        i = es->top;
  483|      0|    else
  484|      0|        i = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   55|      0|#  define ERR_NUM_ERRORS  16
  ------------------
  485|       |
  486|      4|    ret = es->err_buffer[i];
  487|      4|    if (g == EV_POP) {
  ------------------
  |  Branch (487:9): [True: 0, False: 4]
  ------------------
  488|      0|        es->bottom = i;
  489|      0|        es->err_buffer[i] = 0;
  490|      0|    }
  491|       |
  492|      4|    if (file != NULL) {
  ------------------
  |  Branch (492:9): [True: 0, False: 4]
  ------------------
  493|      0|        *file = es->err_file[i];
  494|      0|        if (*file == NULL)
  ------------------
  |  Branch (494:13): [True: 0, False: 0]
  ------------------
  495|      0|            *file = "";
  496|      0|    }
  497|      4|    if (line != NULL)
  ------------------
  |  Branch (497:9): [True: 0, False: 4]
  ------------------
  498|      0|        *line = es->err_line[i];
  499|      4|    if (func != NULL) {
  ------------------
  |  Branch (499:9): [True: 0, False: 4]
  ------------------
  500|      0|        *func = es->err_func[i];
  501|      0|        if (*func == NULL)
  ------------------
  |  Branch (501:13): [True: 0, False: 0]
  ------------------
  502|      0|            *func = "";
  503|      0|    }
  504|      4|    if (flags != NULL)
  ------------------
  |  Branch (504:9): [True: 0, False: 4]
  ------------------
  505|      0|        *flags = es->err_data_flags[i];
  506|      4|    if (data == NULL) {
  ------------------
  |  Branch (506:9): [True: 4, False: 0]
  ------------------
  507|      4|        if (g == EV_POP) {
  ------------------
  |  Branch (507:13): [True: 0, False: 4]
  ------------------
  508|      0|            err_clear_data(es, i, 0);
  509|      0|        }
  510|      4|    } else {
  511|      0|        *data = es->err_data[i];
  512|      0|        if (*data == NULL) {
  ------------------
  |  Branch (512:13): [True: 0, False: 0]
  ------------------
  513|      0|            *data = "";
  514|      0|            if (flags != NULL)
  ------------------
  |  Branch (514:17): [True: 0, False: 0]
  ------------------
  515|      0|                *flags = 0;
  516|      0|        }
  517|      0|    }
  518|      4|    return ret;
  519|      4|}
err.c:int_err_get_item:
  189|    140|{
  190|    140|    ERR_STRING_DATA *p = NULL;
  191|       |
  192|    140|    if (!CRYPTO_THREAD_read_lock(err_string_lock))
  ------------------
  |  Branch (192:9): [True: 0, False: 140]
  ------------------
  193|      0|        return NULL;
  194|    140|    p = lh_ERR_STRING_DATA_retrieve(int_error_hash, d);
  ------------------
  |  |  380|    140|#define lh_ERR_STRING_DATA_retrieve(lh, ptr) ((ERR_STRING_DATA *)OPENSSL_LH_retrieve(ossl_check_ERR_STRING_DATA_lh_type(lh), ossl_check_const_ERR_STRING_DATA_lh_plain_type(ptr)))
  ------------------
  195|    140|    CRYPTO_THREAD_unlock(err_string_lock);
  196|       |
  197|    140|    return p;
  198|    140|}
err.c:err_do_init:
  667|      2|{
  668|      2|    set_err_thread_local = 1;
  669|      2|    return CRYPTO_THREAD_init_local(&err_thread_local, NULL);
  670|      2|}
err.c:err_delete_thread_state:
  645|      2|{
  646|      2|    ERR_STATE *state = CRYPTO_THREAD_get_local(&err_thread_local);
  647|      2|    if (state == NULL)
  ------------------
  |  Branch (647:9): [True: 0, False: 2]
  ------------------
  648|      0|        return;
  649|       |
  650|      2|    CRYPTO_THREAD_set_local(&err_thread_local, NULL);
  651|      2|    OSSL_ERR_STATE_free(state);
  652|      2|}

ossl_err_load_crypto_strings:
   49|      2|{
   50|      2|    if (0
  ------------------
  |  Branch (50:9): [Folded - Ignored]
  ------------------
   51|      2|#ifndef OPENSSL_NO_ERR
   52|      2|        || ossl_err_load_ERR_strings() == 0 /* include error strings for SYSerr */
  ------------------
  |  Branch (52:12): [True: 0, False: 2]
  ------------------
   53|      2|        || ossl_err_load_BN_strings() == 0
  ------------------
  |  Branch (53:12): [True: 0, False: 2]
  ------------------
   54|      2|        || ossl_err_load_RSA_strings() == 0
  ------------------
  |  Branch (54:12): [True: 0, False: 2]
  ------------------
   55|      2|# ifndef OPENSSL_NO_DH
   56|      2|        || ossl_err_load_DH_strings() == 0
  ------------------
  |  Branch (56:12): [True: 0, False: 2]
  ------------------
   57|      2|# endif
   58|      2|        || ossl_err_load_EVP_strings() == 0
  ------------------
  |  Branch (58:12): [True: 0, False: 2]
  ------------------
   59|      2|        || ossl_err_load_BUF_strings() == 0
  ------------------
  |  Branch (59:12): [True: 0, False: 2]
  ------------------
   60|      2|        || ossl_err_load_OBJ_strings() == 0
  ------------------
  |  Branch (60:12): [True: 0, False: 2]
  ------------------
   61|      2|        || ossl_err_load_PEM_strings() == 0
  ------------------
  |  Branch (61:12): [True: 0, False: 2]
  ------------------
   62|      2|# ifndef OPENSSL_NO_DSA
   63|      2|        || ossl_err_load_DSA_strings() == 0
  ------------------
  |  Branch (63:12): [True: 0, False: 2]
  ------------------
   64|      2|# endif
   65|      2|        || ossl_err_load_X509_strings() == 0
  ------------------
  |  Branch (65:12): [True: 0, False: 2]
  ------------------
   66|      2|        || ossl_err_load_ASN1_strings() == 0
  ------------------
  |  Branch (66:12): [True: 0, False: 2]
  ------------------
   67|      2|        || ossl_err_load_CONF_strings() == 0
  ------------------
  |  Branch (67:12): [True: 0, False: 2]
  ------------------
   68|      2|        || ossl_err_load_CRYPTO_strings() == 0
  ------------------
  |  Branch (68:12): [True: 0, False: 2]
  ------------------
   69|      2|# ifndef OPENSSL_NO_COMP
   70|      2|        || ossl_err_load_COMP_strings() == 0
  ------------------
  |  Branch (70:12): [True: 0, False: 2]
  ------------------
   71|      2|# endif
   72|      2|# ifndef OPENSSL_NO_EC
   73|      2|        || ossl_err_load_EC_strings() == 0
  ------------------
  |  Branch (73:12): [True: 0, False: 2]
  ------------------
   74|      2|# endif
   75|       |        /* skip ossl_err_load_SSL_strings() because it is not in this library */
   76|      2|        || ossl_err_load_BIO_strings() == 0
  ------------------
  |  Branch (76:12): [True: 0, False: 2]
  ------------------
   77|      2|        || ossl_err_load_PKCS7_strings() == 0
  ------------------
  |  Branch (77:12): [True: 0, False: 2]
  ------------------
   78|      2|        || ossl_err_load_X509V3_strings() == 0
  ------------------
  |  Branch (78:12): [True: 0, False: 2]
  ------------------
   79|      2|        || ossl_err_load_PKCS12_strings() == 0
  ------------------
  |  Branch (79:12): [True: 0, False: 2]
  ------------------
   80|      2|        || ossl_err_load_RAND_strings() == 0
  ------------------
  |  Branch (80:12): [True: 0, False: 2]
  ------------------
   81|      2|        || ossl_err_load_DSO_strings() == 0
  ------------------
  |  Branch (81:12): [True: 0, False: 2]
  ------------------
   82|      2|# ifndef OPENSSL_NO_TS
   83|      2|        || ossl_err_load_TS_strings() == 0
  ------------------
  |  Branch (83:12): [True: 0, False: 2]
  ------------------
   84|      2|# endif
   85|      2|# ifndef OPENSSL_NO_ENGINE
   86|      2|        || ossl_err_load_ENGINE_strings() == 0
  ------------------
  |  Branch (86:12): [True: 0, False: 2]
  ------------------
   87|      2|# endif
   88|      2|# ifndef OPENSSL_NO_HTTP
   89|      2|        || ossl_err_load_HTTP_strings() == 0
  ------------------
  |  Branch (89:12): [True: 0, False: 2]
  ------------------
   90|      2|# endif
   91|      2|# ifndef OPENSSL_NO_OCSP
   92|      2|        || ossl_err_load_OCSP_strings() == 0
  ------------------
  |  Branch (92:12): [True: 0, False: 2]
  ------------------
   93|      2|# endif
   94|      2|        || ossl_err_load_UI_strings() == 0
  ------------------
  |  Branch (94:12): [True: 0, False: 2]
  ------------------
   95|      2|# ifndef OPENSSL_NO_CMS
   96|      2|        || ossl_err_load_CMS_strings() == 0
  ------------------
  |  Branch (96:12): [True: 0, False: 2]
  ------------------
   97|      2|# endif
   98|      2|# ifndef OPENSSL_NO_CRMF
   99|      2|        || ossl_err_load_CRMF_strings() == 0
  ------------------
  |  Branch (99:12): [True: 0, False: 2]
  ------------------
  100|      2|        || ossl_err_load_CMP_strings() == 0
  ------------------
  |  Branch (100:12): [True: 0, False: 2]
  ------------------
  101|      2|# endif
  102|      2|# ifndef OPENSSL_NO_CT
  103|      2|        || ossl_err_load_CT_strings() == 0
  ------------------
  |  Branch (103:12): [True: 0, False: 2]
  ------------------
  104|      2|# endif
  105|      2|        || ossl_err_load_ESS_strings() == 0
  ------------------
  |  Branch (105:12): [True: 0, False: 2]
  ------------------
  106|      2|        || ossl_err_load_ASYNC_strings() == 0
  ------------------
  |  Branch (106:12): [True: 0, False: 2]
  ------------------
  107|      2|        || ossl_err_load_OSSL_STORE_strings() == 0
  ------------------
  |  Branch (107:12): [True: 0, False: 2]
  ------------------
  108|      2|        || ossl_err_load_PROP_strings() == 0
  ------------------
  |  Branch (108:12): [True: 0, False: 2]
  ------------------
  109|      2|        || ossl_err_load_PROV_strings() == 0
  ------------------
  |  Branch (109:12): [True: 0, False: 2]
  ------------------
  110|      2|#endif
  111|      2|        )
  112|      0|        return 0;
  113|       |
  114|      2|    return 1;
  115|      2|}

ERR_new:
   17|      6|{
   18|      6|    ERR_STATE *es;
   19|       |
   20|      6|    es = ossl_err_get_state_int();
   21|      6|    if (es == NULL)
  ------------------
  |  Branch (21:9): [True: 0, False: 6]
  ------------------
   22|      0|        return;
   23|       |
   24|       |    /* Allocate a slot */
   25|      6|    err_get_slot(es);
   26|      6|    err_clear(es, es->top, 0);
   27|      6|}
ERR_set_debug:
   30|      6|{
   31|      6|    ERR_STATE *es;
   32|       |
   33|      6|    es = ossl_err_get_state_int();
   34|      6|    if (es == NULL)
  ------------------
  |  Branch (34:9): [True: 0, False: 6]
  ------------------
   35|      0|        return;
   36|       |
   37|      6|    err_set_debug(es, es->top, file, line, func);
   38|      6|}
ERR_set_error:
   41|      6|{
   42|      6|    va_list args;
   43|       |
   44|      6|    va_start(args, fmt);
   45|      6|    ERR_vset_error(lib, reason, fmt, args);
   46|      6|    va_end(args);
   47|      6|}
ERR_vset_error:
   50|      6|{
   51|      6|    ERR_STATE *es;
   52|      6|    char *buf = NULL;
   53|      6|    size_t buf_size = 0;
   54|      6|    unsigned long flags = 0;
   55|      6|    size_t i;
   56|       |
   57|      6|    es = ossl_err_get_state_int();
   58|      6|    if (es == NULL)
  ------------------
  |  Branch (58:9): [True: 0, False: 6]
  ------------------
   59|      0|        return;
   60|      6|    i = es->top;
   61|       |
   62|      6|    if (fmt != NULL) {
  ------------------
  |  Branch (62:9): [True: 2, False: 4]
  ------------------
   63|      2|        int printed_len = 0;
   64|      2|        char *rbuf = NULL;
   65|       |
   66|      2|        buf = es->err_data[i];
   67|      2|        buf_size = es->err_data_size[i];
   68|       |
   69|       |        /*
   70|       |         * To protect the string we just grabbed from tampering by other
   71|       |         * functions we may call, or to protect them from freeing a pointer
   72|       |         * that may no longer be valid at that point, we clear away the
   73|       |         * data pointer and the flags.  We will set them again at the end
   74|       |         * of this function.
   75|       |         */
   76|      2|        es->err_data[i] = NULL;
   77|      2|        es->err_data_flags[i] = 0;
   78|       |
   79|       |        /*
   80|       |         * Try to maximize the space available.  If that fails, we use what
   81|       |         * we have.
   82|       |         */
   83|      2|        if (buf_size < ERR_MAX_DATA_SIZE
  ------------------
  |  |  392|      4|#define ERR_MAX_DATA_SIZE       1024
  ------------------
  |  Branch (83:13): [True: 2, False: 0]
  ------------------
   84|      2|            && (rbuf = OPENSSL_realloc(buf, ERR_MAX_DATA_SIZE)) != NULL) {
  ------------------
  |  |  109|      2|        CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (84:16): [True: 2, False: 0]
  ------------------
   85|      2|            buf = rbuf;
   86|      2|            buf_size = ERR_MAX_DATA_SIZE;
  ------------------
  |  |  392|      2|#define ERR_MAX_DATA_SIZE       1024
  ------------------
   87|      2|        }
   88|       |
   89|      2|        if (buf != NULL) {
  ------------------
  |  Branch (89:13): [True: 2, False: 0]
  ------------------
   90|      2|            printed_len = BIO_vsnprintf(buf, buf_size, fmt, args);
   91|      2|        }
   92|      2|        if (printed_len < 0)
  ------------------
  |  Branch (92:13): [True: 0, False: 2]
  ------------------
   93|      0|            printed_len = 0;
   94|      2|        if (buf != NULL)
  ------------------
  |  Branch (94:13): [True: 2, False: 0]
  ------------------
   95|      2|            buf[printed_len] = '\0';
   96|       |
   97|       |        /*
   98|       |         * Try to reduce the size, but only if we maximized above.  If that
   99|       |         * fails, we keep what we have.
  100|       |         * (According to documentation, realloc leaves the old buffer untouched
  101|       |         * if it fails)
  102|       |         */
  103|      2|        if ((rbuf = OPENSSL_realloc(buf, printed_len + 1)) != NULL) {
  ------------------
  |  |  109|      2|        CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (103:13): [True: 2, False: 0]
  ------------------
  104|      2|            buf = rbuf;
  105|      2|            buf_size = printed_len + 1;
  106|      2|            buf[printed_len] = '\0';
  107|      2|        }
  108|       |
  109|      2|        if (buf != NULL)
  ------------------
  |  Branch (109:13): [True: 2, False: 0]
  ------------------
  110|      2|            flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   48|      2|# define ERR_TXT_MALLOCED        0x01
  ------------------
                          flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   49|      2|# define ERR_TXT_STRING          0x02
  ------------------
  111|      2|    }
  112|       |
  113|      6|    err_clear_data(es, es->top, 0);
  114|      6|    err_set_error(es, es->top, lib, reason);
  115|      6|    if (fmt != NULL)
  ------------------
  |  Branch (115:9): [True: 2, False: 4]
  ------------------
  116|      2|        err_set_data(es, es->top, buf, buf_size, flags);
  117|      6|}

err.c:err_clear:
   85|     64|{
   86|     64|    err_clear_data(es, i, (deall));
   87|     64|    es->err_marks[i] = 0;
   88|     64|    es->err_flags[i] = 0;
   89|     64|    es->err_buffer[i] = 0;
   90|     64|    es->err_line[i] = -1;
   91|     64|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  115|     64|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     64|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     64|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   92|     64|    es->err_file[i] = NULL;
   93|     64|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  115|     64|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     64|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     64|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|     64|    es->err_func[i] = NULL;
   95|     64|}
err.c:err_clear_data:
   22|     64|{
   23|     64|    if (es->err_data_flags[i] & ERR_TXT_MALLOCED) {
  ------------------
  |  |   48|     64|# define ERR_TXT_MALLOCED        0x01
  ------------------
  |  Branch (23:9): [True: 4, False: 60]
  ------------------
   24|      4|        if (deall) {
  ------------------
  |  Branch (24:13): [True: 2, False: 2]
  ------------------
   25|      2|            OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   26|      2|            es->err_data[i] = NULL;
   27|      2|            es->err_data_size[i] = 0;
   28|      2|            es->err_data_flags[i] = 0;
   29|      2|        } else if (es->err_data[i] != NULL) {
  ------------------
  |  Branch (29:20): [True: 2, False: 0]
  ------------------
   30|      2|            es->err_data[i][0] = '\0';
   31|      2|            es->err_data_flags[i] = ERR_TXT_MALLOCED;
  ------------------
  |  |   48|      2|# define ERR_TXT_MALLOCED        0x01
  ------------------
   32|      2|        }
   33|     60|    } else {
   34|     60|        es->err_data[i] = NULL;
   35|     60|        es->err_data_size[i] = 0;
   36|     60|        es->err_data_flags[i] = 0;
   37|     60|    }
   38|     64|}
err_blocks.c:err_get_slot:
   15|      6|{
   16|      6|    es->top = (es->top + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   55|      6|#  define ERR_NUM_ERRORS  16
  ------------------
   17|      6|    if (es->top == es->bottom)
  ------------------
  |  Branch (17:9): [True: 0, False: 6]
  ------------------
   18|      0|        es->bottom = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   55|      0|#  define ERR_NUM_ERRORS  16
  ------------------
   19|      6|}
err_blocks.c:err_clear:
   85|      6|{
   86|      6|    err_clear_data(es, i, (deall));
   87|      6|    es->err_marks[i] = 0;
   88|      6|    es->err_flags[i] = 0;
   89|      6|    es->err_buffer[i] = 0;
   90|      6|    es->err_line[i] = -1;
   91|      6|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  115|      6|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      6|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      6|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   92|      6|    es->err_file[i] = NULL;
   93|      6|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  115|      6|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      6|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      6|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|      6|    es->err_func[i] = NULL;
   95|      6|}
err_blocks.c:err_set_debug:
   52|      6|{
   53|       |    /*
   54|       |     * We dup the file and fn strings because they may be provider owned. If the
   55|       |     * provider gets unloaded, they may not be valid anymore.
   56|       |     */
   57|      6|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  115|      6|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      6|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      6|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   58|      6|    if (file == NULL || file[0] == '\0')
  ------------------
  |  Branch (58:9): [True: 0, False: 6]
  |  Branch (58:25): [True: 0, False: 6]
  ------------------
   59|      0|        es->err_file[i] = NULL;
   60|      6|    else if ((es->err_file[i] = CRYPTO_malloc(strlen(file) + 1,
  ------------------
  |  Branch (60:14): [True: 6, False: 0]
  ------------------
   61|      6|                                              NULL, 0)) != NULL)
   62|       |        /* We cannot use OPENSSL_strdup due to possible recursion */
   63|      6|        strcpy(es->err_file[i], file);
   64|       |
   65|      6|    es->err_line[i] = line;
   66|      6|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  115|      6|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      6|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      6|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|      6|    if (fn == NULL || fn[0] == '\0')
  ------------------
  |  Branch (67:9): [True: 0, False: 6]
  |  Branch (67:23): [True: 0, False: 6]
  ------------------
   68|      0|        es->err_func[i] = NULL;
   69|      6|    else if ((es->err_func[i] = CRYPTO_malloc(strlen(fn) + 1,
  ------------------
  |  Branch (69:14): [True: 6, False: 0]
  ------------------
   70|      6|                                              NULL, 0)) != NULL)
   71|      6|        strcpy(es->err_func[i], fn);
   72|      6|}
err_blocks.c:err_clear_data:
   22|     12|{
   23|     12|    if (es->err_data_flags[i] & ERR_TXT_MALLOCED) {
  ------------------
  |  |   48|     12|# define ERR_TXT_MALLOCED        0x01
  ------------------
  |  Branch (23:9): [True: 0, False: 12]
  ------------------
   24|      0|        if (deall) {
  ------------------
  |  Branch (24:13): [True: 0, False: 0]
  ------------------
   25|      0|            OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   26|      0|            es->err_data[i] = NULL;
   27|      0|            es->err_data_size[i] = 0;
   28|      0|            es->err_data_flags[i] = 0;
   29|      0|        } else if (es->err_data[i] != NULL) {
  ------------------
  |  Branch (29:20): [True: 0, False: 0]
  ------------------
   30|      0|            es->err_data[i][0] = '\0';
   31|      0|            es->err_data_flags[i] = ERR_TXT_MALLOCED;
  ------------------
  |  |   48|      0|# define ERR_TXT_MALLOCED        0x01
  ------------------
   32|      0|        }
   33|     12|    } else {
   34|     12|        es->err_data[i] = NULL;
   35|     12|        es->err_data_size[i] = 0;
   36|     12|        es->err_data_flags[i] = 0;
   37|     12|    }
   38|     12|}
err_blocks.c:err_set_error:
   42|      6|{
   43|      6|    es->err_buffer[i] =
   44|      6|        lib == ERR_LIB_SYS
  ------------------
  |  |   72|      6|# define ERR_LIB_SYS             2
  ------------------
  |  Branch (44:9): [True: 2, False: 4]
  ------------------
   45|      6|        ? (unsigned int)(ERR_SYSTEM_FLAG |  reason)
  ------------------
  |  |  218|      2|# define ERR_SYSTEM_FLAG                ((unsigned int)INT_MAX + 1)
  ------------------
   46|      6|        : ERR_PACK(lib, 0, reason);
  ------------------
  |  |  279|     10|    ( (((unsigned long)(lib)    & ERR_LIB_MASK   ) << ERR_LIB_OFFSET) | \
  |  |  ------------------
  |  |  |  |  227|      4|# define ERR_LIB_MASK                   0xFF
  |  |  ------------------
  |  |                   ( (((unsigned long)(lib)    & ERR_LIB_MASK   ) << ERR_LIB_OFFSET) | \
  |  |  ------------------
  |  |  |  |  226|      4|# define ERR_LIB_OFFSET                 23L
  |  |  ------------------
  |  |  280|     10|      (((unsigned long)(reason) & ERR_REASON_MASK)) )
  |  |  ------------------
  |  |  |  |  230|      4|# define ERR_REASON_MASK                0X7FFFFF
  |  |  ------------------
  ------------------
   47|      6|}
err_blocks.c:err_set_data:
   76|      2|{
   77|      2|    if ((es->err_data_flags[i] & ERR_TXT_MALLOCED) != 0)
  ------------------
  |  |   48|      2|# define ERR_TXT_MALLOCED        0x01
  ------------------
  |  Branch (77:9): [True: 0, False: 2]
  ------------------
   78|      0|        OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|      2|    es->err_data[i] = data;
   80|      2|    es->err_data_size[i] = datasz;
   81|      2|    es->err_data_flags[i] = flags;
   82|      2|}
err_mark.c:err_clear:
   85|      6|{
   86|      6|    err_clear_data(es, i, (deall));
   87|      6|    es->err_marks[i] = 0;
   88|      6|    es->err_flags[i] = 0;
   89|      6|    es->err_buffer[i] = 0;
   90|      6|    es->err_line[i] = -1;
   91|      6|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  115|      6|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      6|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      6|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   92|      6|    es->err_file[i] = NULL;
   93|      6|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  115|      6|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      6|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      6|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|      6|    es->err_func[i] = NULL;
   95|      6|}
err_mark.c:err_clear_data:
   22|      6|{
   23|      6|    if (es->err_data_flags[i] & ERR_TXT_MALLOCED) {
  ------------------
  |  |   48|      6|# define ERR_TXT_MALLOCED        0x01
  ------------------
  |  Branch (23:9): [True: 2, False: 4]
  ------------------
   24|      2|        if (deall) {
  ------------------
  |  Branch (24:13): [True: 0, False: 2]
  ------------------
   25|      0|            OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   26|      0|            es->err_data[i] = NULL;
   27|      0|            es->err_data_size[i] = 0;
   28|      0|            es->err_data_flags[i] = 0;
   29|      2|        } else if (es->err_data[i] != NULL) {
  ------------------
  |  Branch (29:20): [True: 2, False: 0]
  ------------------
   30|      2|            es->err_data[i][0] = '\0';
   31|      2|            es->err_data_flags[i] = ERR_TXT_MALLOCED;
  ------------------
  |  |   48|      2|# define ERR_TXT_MALLOCED        0x01
  ------------------
   32|      2|        }
   33|      4|    } else {
   34|      4|        es->err_data[i] = NULL;
   35|      4|        es->err_data_size[i] = 0;
   36|      4|        es->err_data_flags[i] = 0;
   37|      4|    }
   38|      6|}

ERR_set_mark:
   16|      2|{
   17|      2|    ERR_STATE *es;
   18|       |
   19|      2|    es = ossl_err_get_state_int();
   20|      2|    if (es == NULL)
  ------------------
  |  Branch (20:9): [True: 0, False: 2]
  ------------------
   21|      0|        return 0;
   22|       |
   23|      2|    if (es->bottom == es->top)
  ------------------
  |  Branch (23:9): [True: 2, False: 0]
  ------------------
   24|      2|        return 0;
   25|      0|    es->err_marks[es->top]++;
   26|      0|    return 1;
   27|      2|}
ERR_pop_to_mark:
   43|      2|{
   44|      2|    ERR_STATE *es;
   45|       |
   46|      2|    es = ossl_err_get_state_int();
   47|      2|    if (es == NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 2]
  ------------------
   48|      0|        return 0;
   49|       |
   50|      8|    while (es->bottom != es->top
  ------------------
  |  Branch (50:12): [True: 6, False: 2]
  ------------------
   51|      8|           && es->err_marks[es->top] == 0) {
  ------------------
  |  Branch (51:15): [True: 6, False: 0]
  ------------------
   52|      6|        err_clear(es, es->top, 0);
   53|      6|        es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   55|      0|#  define ERR_NUM_ERRORS  16
  ------------------
  |  Branch (53:19): [True: 6, False: 0]
  ------------------
   54|      6|    }
   55|       |
   56|      2|    if (es->bottom == es->top)
  ------------------
  |  Branch (56:9): [True: 2, False: 0]
  ------------------
   57|      2|        return 0;
   58|      0|    es->err_marks[es->top]--;
   59|      0|    return 1;
   60|      2|}

OSSL_ERR_STATE_new:
   22|      2|{
   23|      2|    return CRYPTO_zalloc(sizeof(ERR_STATE), NULL, 0);
   24|      2|}

ossl_err_load_ESS_strings:
   42|      2|{
   43|      2|#ifndef OPENSSL_NO_ERR
   44|      2|    if (ERR_reason_error_string(ESS_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (44:9): [True: 2, False: 0]
  ------------------
   45|      2|        ERR_load_strings_const(ESS_str_reasons);
   46|      2|#endif
   47|      2|    return 1;
   48|      2|}

openssl_add_all_ciphers_int:
   18|      2|{
   19|       |
   20|      2|#ifndef OPENSSL_NO_DES
   21|      2|    EVP_add_cipher(EVP_des_cfb());
  ------------------
  |  |  954|      2|#  define EVP_des_cfb EVP_des_cfb64
  ------------------
   22|      2|    EVP_add_cipher(EVP_des_cfb1());
   23|      2|    EVP_add_cipher(EVP_des_cfb8());
   24|      2|    EVP_add_cipher(EVP_des_ede_cfb());
  ------------------
  |  |  958|      2|#  define EVP_des_ede_cfb EVP_des_ede_cfb64
  ------------------
   25|      2|    EVP_add_cipher(EVP_des_ede3_cfb());
  ------------------
  |  |  960|      2|#  define EVP_des_ede3_cfb EVP_des_ede3_cfb64
  ------------------
   26|      2|    EVP_add_cipher(EVP_des_ede3_cfb1());
   27|      2|    EVP_add_cipher(EVP_des_ede3_cfb8());
   28|       |
   29|      2|    EVP_add_cipher(EVP_des_ofb());
   30|      2|    EVP_add_cipher(EVP_des_ede_ofb());
   31|      2|    EVP_add_cipher(EVP_des_ede3_ofb());
   32|       |
   33|      2|    EVP_add_cipher(EVP_desx_cbc());
   34|      2|    EVP_add_cipher_alias(SN_desx_cbc, "DESX");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   35|      2|    EVP_add_cipher_alias(SN_desx_cbc, "desx");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   36|       |
   37|      2|    EVP_add_cipher(EVP_des_cbc());
   38|      2|    EVP_add_cipher_alias(SN_des_cbc, "DES");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   39|      2|    EVP_add_cipher_alias(SN_des_cbc, "des");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   40|      2|    EVP_add_cipher(EVP_des_ede_cbc());
   41|      2|    EVP_add_cipher(EVP_des_ede3_cbc());
   42|      2|    EVP_add_cipher_alias(SN_des_ede3_cbc, "DES3");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   43|      2|    EVP_add_cipher_alias(SN_des_ede3_cbc, "des3");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   44|       |
   45|      2|    EVP_add_cipher(EVP_des_ecb());
   46|      2|    EVP_add_cipher(EVP_des_ede());
   47|      2|    EVP_add_cipher_alias(SN_des_ede_ecb, "DES-EDE-ECB");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   48|      2|    EVP_add_cipher_alias(SN_des_ede_ecb, "des-ede-ecb");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   49|      2|    EVP_add_cipher(EVP_des_ede3());
   50|      2|    EVP_add_cipher_alias(SN_des_ede3_ecb, "DES-EDE3-ECB");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   51|      2|    EVP_add_cipher_alias(SN_des_ede3_ecb, "des-ede3-ecb");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   52|      2|    EVP_add_cipher(EVP_des_ede3_wrap());
   53|      2|    EVP_add_cipher_alias(SN_id_smime_alg_CMS3DESwrap, "des3-wrap");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   54|      2|#endif
   55|       |
   56|      2|#ifndef OPENSSL_NO_RC4
   57|      2|    EVP_add_cipher(EVP_rc4());
   58|      2|    EVP_add_cipher(EVP_rc4_40());
   59|      2|# ifndef OPENSSL_NO_MD5
   60|      2|    EVP_add_cipher(EVP_rc4_hmac_md5());
   61|      2|# endif
   62|      2|#endif
   63|       |
   64|      2|#ifndef OPENSSL_NO_IDEA
   65|      2|    EVP_add_cipher(EVP_idea_ecb());
   66|      2|    EVP_add_cipher(EVP_idea_cfb());
  ------------------
  |  |  987|      2|#  define EVP_idea_cfb EVP_idea_cfb64
  ------------------
   67|      2|    EVP_add_cipher(EVP_idea_ofb());
   68|      2|    EVP_add_cipher(EVP_idea_cbc());
   69|      2|    EVP_add_cipher_alias(SN_idea_cbc, "IDEA");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   70|      2|    EVP_add_cipher_alias(SN_idea_cbc, "idea");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   71|      2|#endif
   72|       |
   73|      2|#ifndef OPENSSL_NO_SEED
   74|      2|    EVP_add_cipher(EVP_seed_ecb());
   75|      2|    EVP_add_cipher(EVP_seed_cfb());
  ------------------
  |  | 1141|      2|#  define EVP_seed_cfb EVP_seed_cfb128
  ------------------
   76|      2|    EVP_add_cipher(EVP_seed_ofb());
   77|      2|    EVP_add_cipher(EVP_seed_cbc());
   78|      2|    EVP_add_cipher_alias(SN_seed_cbc, "SEED");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   79|      2|    EVP_add_cipher_alias(SN_seed_cbc, "seed");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   80|      2|#endif
   81|       |
   82|      2|#ifndef OPENSSL_NO_SM4
   83|      2|    EVP_add_cipher(EVP_sm4_ecb());
   84|      2|    EVP_add_cipher(EVP_sm4_cbc());
   85|      2|    EVP_add_cipher(EVP_sm4_cfb());
  ------------------
  |  | 1149|      2|#  define EVP_sm4_cfb EVP_sm4_cfb128
  ------------------
   86|      2|    EVP_add_cipher(EVP_sm4_ofb());
   87|      2|    EVP_add_cipher(EVP_sm4_ctr());
   88|      2|    EVP_add_cipher_alias(SN_sm4_cbc, "SM4");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   89|      2|    EVP_add_cipher_alias(SN_sm4_cbc, "sm4");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   90|      2|#endif
   91|       |
   92|      2|#ifndef OPENSSL_NO_RC2
   93|      2|    EVP_add_cipher(EVP_rc2_ecb());
   94|      2|    EVP_add_cipher(EVP_rc2_cfb());
  ------------------
  |  |  997|      2|#  define EVP_rc2_cfb EVP_rc2_cfb64
  ------------------
   95|      2|    EVP_add_cipher(EVP_rc2_ofb());
   96|      2|    EVP_add_cipher(EVP_rc2_cbc());
   97|      2|    EVP_add_cipher(EVP_rc2_40_cbc());
   98|      2|    EVP_add_cipher(EVP_rc2_64_cbc());
   99|      2|    EVP_add_cipher_alias(SN_rc2_cbc, "RC2");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  100|      2|    EVP_add_cipher_alias(SN_rc2_cbc, "rc2");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  101|      2|    EVP_add_cipher_alias(SN_rc2_cbc, "rc2-128");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  102|      2|    EVP_add_cipher_alias(SN_rc2_64_cbc, "rc2-64");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  103|      2|    EVP_add_cipher_alias(SN_rc2_40_cbc, "rc2-40");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  104|      2|#endif
  105|       |
  106|      2|#ifndef OPENSSL_NO_BF
  107|      2|    EVP_add_cipher(EVP_bf_ecb());
  108|      2|    EVP_add_cipher(EVP_bf_cfb());
  ------------------
  |  | 1004|      2|#  define EVP_bf_cfb EVP_bf_cfb64
  ------------------
  109|      2|    EVP_add_cipher(EVP_bf_ofb());
  110|      2|    EVP_add_cipher(EVP_bf_cbc());
  111|      2|    EVP_add_cipher_alias(SN_bf_cbc, "BF");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  112|      2|    EVP_add_cipher_alias(SN_bf_cbc, "bf");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  113|      2|    EVP_add_cipher_alias(SN_bf_cbc, "blowfish");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  114|      2|#endif
  115|       |
  116|      2|#ifndef OPENSSL_NO_CAST
  117|      2|    EVP_add_cipher(EVP_cast5_ecb());
  118|      2|    EVP_add_cipher(EVP_cast5_cfb());
  ------------------
  |  | 1011|      2|#  define EVP_cast5_cfb EVP_cast5_cfb64
  ------------------
  119|      2|    EVP_add_cipher(EVP_cast5_ofb());
  120|      2|    EVP_add_cipher(EVP_cast5_cbc());
  121|      2|    EVP_add_cipher_alias(SN_cast5_cbc, "CAST");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  122|      2|    EVP_add_cipher_alias(SN_cast5_cbc, "cast");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  123|      2|    EVP_add_cipher_alias(SN_cast5_cbc, "CAST-cbc");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  124|      2|    EVP_add_cipher_alias(SN_cast5_cbc, "cast-cbc");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  125|      2|#endif
  126|       |
  127|      2|#ifndef OPENSSL_NO_RC5
  128|      2|    EVP_add_cipher(EVP_rc5_32_12_16_ecb());
  129|      2|    EVP_add_cipher(EVP_rc5_32_12_16_cfb());
  ------------------
  |  | 1018|      2|#  define EVP_rc5_32_12_16_cfb EVP_rc5_32_12_16_cfb64
  ------------------
  130|      2|    EVP_add_cipher(EVP_rc5_32_12_16_ofb());
  131|      2|    EVP_add_cipher(EVP_rc5_32_12_16_cbc());
  132|      2|    EVP_add_cipher_alias(SN_rc5_cbc, "rc5");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  133|      2|    EVP_add_cipher_alias(SN_rc5_cbc, "RC5");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  134|      2|#endif
  135|       |
  136|      2|    EVP_add_cipher(EVP_aes_128_ecb());
  137|      2|    EVP_add_cipher(EVP_aes_128_cbc());
  138|      2|    EVP_add_cipher(EVP_aes_128_cfb());
  ------------------
  |  | 1026|      2|# define EVP_aes_128_cfb EVP_aes_128_cfb128
  ------------------
  139|      2|    EVP_add_cipher(EVP_aes_128_cfb1());
  140|      2|    EVP_add_cipher(EVP_aes_128_cfb8());
  141|      2|    EVP_add_cipher(EVP_aes_128_ofb());
  142|      2|    EVP_add_cipher(EVP_aes_128_ctr());
  143|      2|    EVP_add_cipher(EVP_aes_128_gcm());
  144|      2|#ifndef OPENSSL_NO_OCB
  145|      2|    EVP_add_cipher(EVP_aes_128_ocb());
  146|      2|#endif
  147|      2|    EVP_add_cipher(EVP_aes_128_xts());
  148|      2|    EVP_add_cipher(EVP_aes_128_ccm());
  149|      2|    EVP_add_cipher(EVP_aes_128_wrap());
  150|      2|    EVP_add_cipher_alias(SN_id_aes128_wrap, "aes128-wrap");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  151|      2|    EVP_add_cipher(EVP_aes_128_wrap_pad());
  152|      2|    EVP_add_cipher_alias(SN_id_aes128_wrap_pad, "aes128-wrap-pad");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  153|      2|    EVP_add_cipher_alias(SN_aes_128_cbc, "AES128");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  154|      2|    EVP_add_cipher_alias(SN_aes_128_cbc, "aes128");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  155|      2|    EVP_add_cipher(EVP_aes_192_ecb());
  156|      2|    EVP_add_cipher(EVP_aes_192_cbc());
  157|      2|    EVP_add_cipher(EVP_aes_192_cfb());
  ------------------
  |  | 1042|      2|# define EVP_aes_192_cfb EVP_aes_192_cfb128
  ------------------
  158|      2|    EVP_add_cipher(EVP_aes_192_cfb1());
  159|      2|    EVP_add_cipher(EVP_aes_192_cfb8());
  160|      2|    EVP_add_cipher(EVP_aes_192_ofb());
  161|      2|    EVP_add_cipher(EVP_aes_192_ctr());
  162|      2|    EVP_add_cipher(EVP_aes_192_gcm());
  163|      2|#ifndef OPENSSL_NO_OCB
  164|      2|    EVP_add_cipher(EVP_aes_192_ocb());
  165|      2|#endif
  166|      2|    EVP_add_cipher(EVP_aes_192_ccm());
  167|      2|    EVP_add_cipher(EVP_aes_192_wrap());
  168|      2|    EVP_add_cipher_alias(SN_id_aes192_wrap, "aes192-wrap");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  169|      2|    EVP_add_cipher(EVP_aes_192_wrap_pad());
  170|      2|    EVP_add_cipher_alias(SN_id_aes192_wrap_pad, "aes192-wrap-pad");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  171|      2|    EVP_add_cipher_alias(SN_aes_192_cbc, "AES192");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  172|      2|    EVP_add_cipher_alias(SN_aes_192_cbc, "aes192");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  173|      2|    EVP_add_cipher(EVP_aes_256_ecb());
  174|      2|    EVP_add_cipher(EVP_aes_256_cbc());
  175|      2|    EVP_add_cipher(EVP_aes_256_cfb());
  ------------------
  |  | 1057|      2|# define EVP_aes_256_cfb EVP_aes_256_cfb128
  ------------------
  176|      2|    EVP_add_cipher(EVP_aes_256_cfb1());
  177|      2|    EVP_add_cipher(EVP_aes_256_cfb8());
  178|      2|    EVP_add_cipher(EVP_aes_256_ofb());
  179|      2|    EVP_add_cipher(EVP_aes_256_ctr());
  180|      2|    EVP_add_cipher(EVP_aes_256_gcm());
  181|      2|#ifndef OPENSSL_NO_OCB
  182|      2|    EVP_add_cipher(EVP_aes_256_ocb());
  183|      2|#endif
  184|      2|    EVP_add_cipher(EVP_aes_256_xts());
  185|      2|    EVP_add_cipher(EVP_aes_256_ccm());
  186|      2|    EVP_add_cipher(EVP_aes_256_wrap());
  187|      2|    EVP_add_cipher_alias(SN_id_aes256_wrap, "aes256-wrap");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  188|      2|    EVP_add_cipher(EVP_aes_256_wrap_pad());
  189|      2|    EVP_add_cipher_alias(SN_id_aes256_wrap_pad, "aes256-wrap-pad");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  190|      2|    EVP_add_cipher_alias(SN_aes_256_cbc, "AES256");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  191|      2|    EVP_add_cipher_alias(SN_aes_256_cbc, "aes256");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  192|      2|    EVP_add_cipher(EVP_aes_128_cbc_hmac_sha1());
  193|      2|    EVP_add_cipher(EVP_aes_256_cbc_hmac_sha1());
  194|      2|    EVP_add_cipher(EVP_aes_128_cbc_hmac_sha256());
  195|      2|    EVP_add_cipher(EVP_aes_256_cbc_hmac_sha256());
  196|      2|#ifndef OPENSSL_NO_ARIA
  197|      2|    EVP_add_cipher(EVP_aria_128_ecb());
  198|      2|    EVP_add_cipher(EVP_aria_128_cbc());
  199|      2|    EVP_add_cipher(EVP_aria_128_cfb());
  ------------------
  |  | 1078|      2|#  define EVP_aria_128_cfb EVP_aria_128_cfb128
  ------------------
  200|      2|    EVP_add_cipher(EVP_aria_128_cfb1());
  201|      2|    EVP_add_cipher(EVP_aria_128_cfb8());
  202|      2|    EVP_add_cipher(EVP_aria_128_ctr());
  203|      2|    EVP_add_cipher(EVP_aria_128_ofb());
  204|      2|    EVP_add_cipher(EVP_aria_128_gcm());
  205|      2|    EVP_add_cipher(EVP_aria_128_ccm());
  206|      2|    EVP_add_cipher_alias(SN_aria_128_cbc, "ARIA128");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  207|      2|    EVP_add_cipher_alias(SN_aria_128_cbc, "aria128");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  208|      2|    EVP_add_cipher(EVP_aria_192_ecb());
  209|      2|    EVP_add_cipher(EVP_aria_192_cbc());
  210|      2|    EVP_add_cipher(EVP_aria_192_cfb());
  ------------------
  |  | 1088|      2|#  define EVP_aria_192_cfb EVP_aria_192_cfb128
  ------------------
  211|      2|    EVP_add_cipher(EVP_aria_192_cfb1());
  212|      2|    EVP_add_cipher(EVP_aria_192_cfb8());
  213|      2|    EVP_add_cipher(EVP_aria_192_ctr());
  214|      2|    EVP_add_cipher(EVP_aria_192_ofb());
  215|      2|    EVP_add_cipher(EVP_aria_192_gcm());
  216|      2|    EVP_add_cipher(EVP_aria_192_ccm());
  217|      2|    EVP_add_cipher_alias(SN_aria_192_cbc, "ARIA192");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  218|      2|    EVP_add_cipher_alias(SN_aria_192_cbc, "aria192");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  219|      2|    EVP_add_cipher(EVP_aria_256_ecb());
  220|      2|    EVP_add_cipher(EVP_aria_256_cbc());
  221|      2|    EVP_add_cipher(EVP_aria_256_cfb());
  ------------------
  |  | 1098|      2|#  define EVP_aria_256_cfb EVP_aria_256_cfb128
  ------------------
  222|      2|    EVP_add_cipher(EVP_aria_256_cfb1());
  223|      2|    EVP_add_cipher(EVP_aria_256_cfb8());
  224|      2|    EVP_add_cipher(EVP_aria_256_ctr());
  225|      2|    EVP_add_cipher(EVP_aria_256_ofb());
  226|      2|    EVP_add_cipher(EVP_aria_256_gcm());
  227|      2|    EVP_add_cipher(EVP_aria_256_ccm());
  228|      2|    EVP_add_cipher_alias(SN_aria_256_cbc, "ARIA256");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  229|      2|    EVP_add_cipher_alias(SN_aria_256_cbc, "aria256");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  230|      2|#endif
  231|       |
  232|      2|#ifndef OPENSSL_NO_CAMELLIA
  233|      2|    EVP_add_cipher(EVP_camellia_128_ecb());
  234|      2|    EVP_add_cipher(EVP_camellia_128_cbc());
  235|      2|    EVP_add_cipher(EVP_camellia_128_cfb());
  ------------------
  |  | 1110|      2|#  define EVP_camellia_128_cfb EVP_camellia_128_cfb128
  ------------------
  236|      2|    EVP_add_cipher(EVP_camellia_128_cfb1());
  237|      2|    EVP_add_cipher(EVP_camellia_128_cfb8());
  238|      2|    EVP_add_cipher(EVP_camellia_128_ofb());
  239|      2|    EVP_add_cipher_alias(SN_camellia_128_cbc, "CAMELLIA128");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  240|      2|    EVP_add_cipher_alias(SN_camellia_128_cbc, "camellia128");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  241|      2|    EVP_add_cipher(EVP_camellia_192_ecb());
  242|      2|    EVP_add_cipher(EVP_camellia_192_cbc());
  243|      2|    EVP_add_cipher(EVP_camellia_192_cfb());
  ------------------
  |  | 1118|      2|#  define EVP_camellia_192_cfb EVP_camellia_192_cfb128
  ------------------
  244|      2|    EVP_add_cipher(EVP_camellia_192_cfb1());
  245|      2|    EVP_add_cipher(EVP_camellia_192_cfb8());
  246|      2|    EVP_add_cipher(EVP_camellia_192_ofb());
  247|      2|    EVP_add_cipher_alias(SN_camellia_192_cbc, "CAMELLIA192");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  248|      2|    EVP_add_cipher_alias(SN_camellia_192_cbc, "camellia192");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  249|      2|    EVP_add_cipher(EVP_camellia_256_ecb());
  250|      2|    EVP_add_cipher(EVP_camellia_256_cbc());
  251|      2|    EVP_add_cipher(EVP_camellia_256_cfb());
  ------------------
  |  | 1126|      2|#  define EVP_camellia_256_cfb EVP_camellia_256_cfb128
  ------------------
  252|      2|    EVP_add_cipher(EVP_camellia_256_cfb1());
  253|      2|    EVP_add_cipher(EVP_camellia_256_cfb8());
  254|      2|    EVP_add_cipher(EVP_camellia_256_ofb());
  255|      2|    EVP_add_cipher_alias(SN_camellia_256_cbc, "CAMELLIA256");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  256|      2|    EVP_add_cipher_alias(SN_camellia_256_cbc, "camellia256");
  ------------------
  |  |  685|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
  257|      2|    EVP_add_cipher(EVP_camellia_128_ctr());
  258|      2|    EVP_add_cipher(EVP_camellia_192_ctr());
  259|      2|    EVP_add_cipher(EVP_camellia_256_ctr());
  260|      2|#endif
  261|       |
  262|      2|#ifndef OPENSSL_NO_CHACHA
  263|      2|    EVP_add_cipher(EVP_chacha20());
  264|      2|# ifndef OPENSSL_NO_POLY1305
  265|      2|    EVP_add_cipher(EVP_chacha20_poly1305());
  266|      2|# endif
  267|      2|#endif
  268|      2|}

openssl_add_all_digests_int:
   18|      2|{
   19|      2|#ifndef OPENSSL_NO_MD4
   20|      2|    EVP_add_digest(EVP_md4());
   21|      2|#endif
   22|      2|#ifndef OPENSSL_NO_MD5
   23|      2|    EVP_add_digest(EVP_md5());
   24|      2|    EVP_add_digest_alias(SN_md5, "ssl3-md5");
  ------------------
  |  |  687|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   25|      2|# define OBJ_NAME_TYPE_MD_METH           0x01
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   25|      2|    EVP_add_digest(EVP_md5_sha1());
   26|      2|#endif
   27|      2|    EVP_add_digest(EVP_sha1());
   28|      2|    EVP_add_digest_alias(SN_sha1, "ssl3-sha1");
  ------------------
  |  |  687|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   25|      2|# define OBJ_NAME_TYPE_MD_METH           0x01
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   29|      2|    EVP_add_digest_alias(SN_sha1WithRSAEncryption, SN_sha1WithRSA);
  ------------------
  |  |  687|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   25|      2|# define OBJ_NAME_TYPE_MD_METH           0x01
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   30|      2|#if !defined(OPENSSL_NO_MDC2) && !defined(OPENSSL_NO_DES)
   31|      2|    EVP_add_digest(EVP_mdc2());
   32|      2|#endif
   33|      2|#ifndef OPENSSL_NO_RMD160
   34|      2|    EVP_add_digest(EVP_ripemd160());
   35|      2|    EVP_add_digest_alias(SN_ripemd160, "ripemd");
  ------------------
  |  |  687|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   25|      2|# define OBJ_NAME_TYPE_MD_METH           0x01
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   36|      2|    EVP_add_digest_alias(SN_ripemd160, "rmd160");
  ------------------
  |  |  687|      2|        OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   25|      2|# define OBJ_NAME_TYPE_MD_METH           0x01
  |  |  ------------------
  |  |                       OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n))
  |  |  ------------------
  |  |  |  |   33|      2|# define OBJ_NAME_ALIAS                  0x8000
  |  |  ------------------
  ------------------
   37|      2|#endif
   38|      2|    EVP_add_digest(EVP_sha224());
   39|      2|    EVP_add_digest(EVP_sha256());
   40|      2|    EVP_add_digest(EVP_sha384());
   41|      2|    EVP_add_digest(EVP_sha512());
   42|      2|    EVP_add_digest(EVP_sha512_224());
   43|      2|    EVP_add_digest(EVP_sha512_256());
   44|      2|#ifndef OPENSSL_NO_WHIRLPOOL
   45|      2|    EVP_add_digest(EVP_whirlpool());
   46|      2|#endif
   47|      2|#ifndef OPENSSL_NO_SM3
   48|      2|    EVP_add_digest(EVP_sm3());
   49|      2|#endif
   50|      2|#ifndef OPENSSL_NO_BLAKE2
   51|      2|    EVP_add_digest(EVP_blake2b512());
   52|      2|    EVP_add_digest(EVP_blake2s256());
   53|      2|#endif
   54|      2|    EVP_add_digest(EVP_sha3_224());
   55|      2|    EVP_add_digest(EVP_sha3_256());
   56|      2|    EVP_add_digest(EVP_sha3_384());
   57|      2|    EVP_add_digest(EVP_sha3_512());
   58|      2|    EVP_add_digest(EVP_shake128());
   59|      2|    EVP_add_digest(EVP_shake256());
   60|      2|}

EVP_aes_128_cbc:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_128_ecb:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_128_ofb:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_128_cfb128:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_128_cfb1:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_128_cfb8:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_128_ctr:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_192_cbc:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_192_ecb:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_192_ofb:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_192_cfb128:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_192_cfb1:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_192_cfb8:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_192_ctr:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_256_cbc:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_256_ecb:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_256_ofb:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_256_cfb128:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_256_cfb1:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_256_cfb8:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_256_ctr:
  442|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  443|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_128_gcm:
  468|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  469|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_192_gcm:
  468|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  469|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_256_gcm:
  468|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  469|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_128_xts:
  468|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  469|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_256_xts:
  468|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  469|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_128_ccm:
  468|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  469|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_192_ccm:
  468|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  469|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_256_ccm:
  468|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  469|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_128_wrap:
 3772|      2|{
 3773|      2|    return &aes_128_wrap;
 3774|      2|}
EVP_aes_192_wrap:
 3786|      2|{
 3787|      2|    return &aes_192_wrap;
 3788|      2|}
EVP_aes_256_wrap:
 3800|      2|{
 3801|      2|    return &aes_256_wrap;
 3802|      2|}
EVP_aes_128_wrap_pad:
 3814|      2|{
 3815|      2|    return &aes_128_wrap_pad;
 3816|      2|}
EVP_aes_192_wrap_pad:
 3828|      2|{
 3829|      2|    return &aes_192_wrap_pad;
 3830|      2|}
EVP_aes_256_wrap_pad:
 3842|      2|{
 3843|      2|    return &aes_256_wrap_pad;
 3844|      2|}
EVP_aes_128_ocb:
  468|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  469|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_192_ocb:
  468|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  469|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------
EVP_aes_256_ocb:
  468|      2|const EVP_CIPHER *EVP_aes_##keylen##_##mode(void) \
  469|      2|{ return AESNI_CAPABLE?&aesni_##keylen##_##mode:&aes_##keylen##_##mode; }
  ------------------
  |  |  186|      2|#  define AESNI_CAPABLE   (OPENSSL_ia32cap_P[1]&(1<<(57-32)))
  |  |  ------------------
  |  |  |  Branch (186:27): [True: 2, False: 0]
  |  |  ------------------
  ------------------

EVP_aes_128_cbc_hmac_sha1:
  956|      2|{
  957|      2|    return (OPENSSL_ia32cap_P[1] & AESNI_CAPABLE ?
  ------------------
  |  |   47|      2|# define AESNI_CAPABLE   (1<<(57-32))
  ------------------
  |  Branch (957:13): [True: 2, False: 0]
  ------------------
  958|      2|            &aesni_128_cbc_hmac_sha1_cipher : NULL);
  959|      2|}
EVP_aes_256_cbc_hmac_sha1:
  962|      2|{
  963|      2|    return (OPENSSL_ia32cap_P[1] & AESNI_CAPABLE ?
  ------------------
  |  |   47|      2|# define AESNI_CAPABLE   (1<<(57-32))
  ------------------
  |  Branch (963:13): [True: 2, False: 0]
  ------------------
  964|      2|            &aesni_256_cbc_hmac_sha1_cipher : NULL);
  965|      2|}

EVP_aes_128_cbc_hmac_sha256:
  933|      2|{
  934|      2|    return ((OPENSSL_ia32cap_P[1] & AESNI_CAPABLE) &&
  ------------------
  |  |   47|      2|# define AESNI_CAPABLE   (1<<(57-32))
  ------------------
  |  Branch (934:13): [True: 2, False: 0]
  ------------------
  935|      2|            aesni_cbc_sha256_enc(NULL, NULL, 0, NULL, NULL, NULL, NULL) ?
  ------------------
  |  Branch (935:13): [True: 2, False: 0]
  ------------------
  936|      2|            &aesni_128_cbc_hmac_sha256_cipher : NULL);
  937|      2|}
EVP_aes_256_cbc_hmac_sha256:
  940|      2|{
  941|      2|    return ((OPENSSL_ia32cap_P[1] & AESNI_CAPABLE) &&
  ------------------
  |  |   47|      2|# define AESNI_CAPABLE   (1<<(57-32))
  ------------------
  |  Branch (941:13): [True: 2, False: 0]
  ------------------
  942|      2|            aesni_cbc_sha256_enc(NULL, NULL, 0, NULL, NULL, NULL, NULL) ?
  ------------------
  |  Branch (942:13): [True: 2, False: 0]
  ------------------
  943|      2|            &aesni_256_cbc_hmac_sha256_cipher : NULL);
  944|      2|}

EVP_aria_128_ctr:
  172|      2|const EVP_CIPHER *EVP_aria_##keylen##_##mode(void) \
  173|      2|{ return &aria_##keylen##_##mode; }
EVP_aria_192_ctr:
  172|      2|const EVP_CIPHER *EVP_aria_##keylen##_##mode(void) \
  173|      2|{ return &aria_##keylen##_##mode; }
EVP_aria_256_ctr:
  172|      2|const EVP_CIPHER *EVP_aria_##keylen##_##mode(void) \
  173|      2|{ return &aria_##keylen##_##mode; }
EVP_aria_128_gcm:
  775|      2|const EVP_CIPHER *EVP_aria_##keylen##_##mode(void) \
  776|      2|{ return (EVP_CIPHER*)&aria_##keylen##_##mode; }
EVP_aria_192_gcm:
  775|      2|const EVP_CIPHER *EVP_aria_##keylen##_##mode(void) \
  776|      2|{ return (EVP_CIPHER*)&aria_##keylen##_##mode; }
EVP_aria_256_gcm:
  775|      2|const EVP_CIPHER *EVP_aria_##keylen##_##mode(void) \
  776|      2|{ return (EVP_CIPHER*)&aria_##keylen##_##mode; }
EVP_aria_128_ccm:
  775|      2|const EVP_CIPHER *EVP_aria_##keylen##_##mode(void) \
  776|      2|{ return (EVP_CIPHER*)&aria_##keylen##_##mode; }
EVP_aria_192_ccm:
  775|      2|const EVP_CIPHER *EVP_aria_##keylen##_##mode(void) \
  776|      2|{ return (EVP_CIPHER*)&aria_##keylen##_##mode; }
EVP_aria_256_ccm:
  775|      2|const EVP_CIPHER *EVP_aria_##keylen##_##mode(void) \
  776|      2|{ return (EVP_CIPHER*)&aria_##keylen##_##mode; }

EVP_camellia_128_cbc:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_128_ecb:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_128_ofb:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_128_cfb128:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_128_cfb1:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_128_cfb8:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_128_ctr:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_192_cbc:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_192_ecb:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_192_ofb:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_192_cfb128:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_192_cfb1:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_192_cfb8:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_192_ctr:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_256_cbc:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_256_ecb:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_256_ofb:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_256_cfb128:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_256_cfb1:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_256_cfb8:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }
EVP_camellia_256_ctr:
  177|      2|const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \
  178|      2|{ return &camellia_##keylen##_##mode; }

EVP_chacha20:
  146|      2|{
  147|      2|    return &chacha20;
  148|      2|}
EVP_chacha20_poly1305:
  631|      2|{
  632|      2|    return(&chacha20_poly1305);
  633|      2|}

EVP_des_ede:
  303|      2|{
  304|      2|    return &des_ede_ecb;
  305|      2|}
EVP_des_ede3:
  308|      2|{
  309|      2|    return &des_ede3_ecb;
  310|      2|}
EVP_des_ede3_wrap:
  423|      2|{
  424|      2|    return &des3_wrap;
  425|      2|}

EVP_rc2_64_cbc:
   83|      2|{
   84|      2|    return &r2_64_cbc_cipher;
   85|      2|}
EVP_rc2_40_cbc:
   88|      2|{
   89|      2|    return &r2_40_cbc_cipher;
   90|      2|}

EVP_rc4:
   68|      2|{
   69|      2|    return &r4_cipher;
   70|      2|}
EVP_rc4_40:
   73|      2|{
   74|      2|    return &r4_40_cipher;
   75|      2|}

EVP_rc4_hmac_md5:
  270|      2|{
  271|      2|    return &r4_hmac_md5_cipher;
  272|      2|}

EVP_sm4_cbc:
   46|      2|const EVP_CIPHER *EVP_sm4_##mode(void) \
   47|      2|{ return &sm4_##mode; }
EVP_sm4_ecb:
   46|      2|const EVP_CIPHER *EVP_sm4_##mode(void) \
   47|      2|{ return &sm4_##mode; }
EVP_sm4_ofb:
   46|      2|const EVP_CIPHER *EVP_sm4_##mode(void) \
   47|      2|{ return &sm4_##mode; }
EVP_sm4_cfb128:
   46|      2|const EVP_CIPHER *EVP_sm4_##mode(void) \
   47|      2|{ return &sm4_##mode; }
EVP_sm4_ctr:
   46|      2|const EVP_CIPHER *EVP_sm4_##mode(void) \
   47|      2|{ return &sm4_##mode; }

EVP_desx_cbc:
   56|      2|{
   57|      2|    return &d_xcbc_cipher;
   58|      2|}

ossl_err_load_EVP_strings:
  206|      2|{
  207|      2|#ifndef OPENSSL_NO_ERR
  208|      2|    if (ERR_reason_error_string(EVP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (208:9): [True: 2, False: 0]
  ------------------
  209|      2|        ERR_load_strings_const(EVP_str_reasons);
  210|      2|#endif
  211|      2|    return 1;
  212|      2|}

evp_method_store_cache_flush:
  412|      2|{
  413|      2|    OSSL_METHOD_STORE *store = get_evp_method_store(libctx);
  414|       |
  415|      2|    if (store != NULL)
  ------------------
  |  Branch (415:9): [True: 2, False: 0]
  ------------------
  416|      2|        return ossl_method_store_cache_flush_all(store);
  417|      0|    return 1;
  418|      2|}
evp_fetch.c:get_evp_method_store:
   63|      2|{
   64|      2|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX);
  ------------------
  |  |   96|      2|# define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX         0
  ------------------
   65|      2|}

EVP_PBE_cleanup:
  295|      2|{
  296|      2|    sk_EVP_PBE_CTL_pop_free(pbe_algs, free_evp_pbe_ctl);
  297|      2|    pbe_algs = NULL;
  298|      2|}

EVP_RAND_CTX_free:
  386|      4|{
  387|      4|    int ref = 0;
  388|      4|    EVP_RAND_CTX *parent;
  389|       |
  390|      4|    if (ctx == NULL)
  ------------------
  |  Branch (390:9): [True: 4, False: 0]
  ------------------
  391|      4|        return;
  392|       |
  393|      0|    CRYPTO_DOWN_REF(&ctx->refcnt, &ref);
  394|      0|    if (ref > 0)
  ------------------
  |  Branch (394:9): [True: 0, False: 0]
  ------------------
  395|      0|        return;
  396|      0|    parent = ctx->parent;
  397|      0|    ctx->meth->freectx(ctx->algctx);
  398|      0|    ctx->algctx = NULL;
  399|      0|    EVP_RAND_free(ctx->meth);
  400|      0|    CRYPTO_FREE_REF(&ctx->refcnt);
  401|      0|    OPENSSL_free(ctx);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  402|      0|    EVP_RAND_CTX_free(parent);
  403|      0|}

EVP_blake2b512:
   51|      2|{
   52|      2|    return &blake2b_md;
   53|      2|}
EVP_blake2s256:
   66|      2|{
   67|      2|    return &blake2s_md;
   68|      2|}

EVP_md4:
   32|      2|{
   33|      2|    return &md4_md;
   34|      2|}

EVP_md5:
   32|      2|{
   33|      2|    return &md5_md;
   34|      2|}

EVP_md5_sha1:
   39|      2|{
   40|      2|    return &md5_sha1_md;
   41|      2|}

EVP_mdc2:
   33|      2|{
   34|      2|    return &mdc2_md;
   35|      2|}

EVP_ripemd160:
   33|      2|{
   34|      2|    return &ripemd160_md;
   35|      2|}

EVP_sha1:
  103|      2|{
  104|      2|    return &sha1_md;
  105|      2|}
EVP_sha224:
  118|      2|{
  119|      2|    return &sha224_md;
  120|      2|}
EVP_sha256:
  133|      2|{
  134|      2|    return &sha256_md;
  135|      2|}
EVP_sha512_224:
  148|      2|{
  149|      2|    return &sha512_224_md;
  150|      2|}
EVP_sha512_256:
  163|      2|{
  164|      2|    return &sha512_256_md;
  165|      2|}
EVP_sha384:
  178|      2|{
  179|      2|    return &sha384_md;
  180|      2|}
EVP_sha512:
  193|      2|{
  194|      2|    return &sha512_md;
  195|      2|}
EVP_sha3_224:
  198|      2|const EVP_MD *EVP_sha3_##bitlen(void)                                          \
  199|      2|{                                                                              \
  200|      2|    static const EVP_MD sha3_##bitlen##_md = {                                 \
  201|      2|        NID_sha3_##bitlen,                                                     \
  202|      2|        NID_RSA_SHA3_##bitlen,                                                 \
  203|      2|        bitlen / 8,                                                            \
  204|      2|        EVP_MD_FLAG_DIGALGID_ABSENT,                                           \
  ------------------
  |  |  176|      2|#  define EVP_MD_FLAG_DIGALGID_ABSENT             0x0008
  ------------------
  205|      2|        EVP_ORIG_GLOBAL,                                                       \
  ------------------
  |  |  252|      2|#define EVP_ORIG_GLOBAL     1
  ------------------
  206|      2|        LEGACY_EVP_MD_METH_TABLE(sha3_int_init, sha3_int_update,               \
  ------------------
  |  |   40|      2|    init, update, final, NULL, NULL, blksz, 0, ctrl
  ------------------
  207|      2|                                 sha3_int_final, NULL,                         \
  208|      2|                                 (KECCAK1600_WIDTH - bitlen * 2) / 8),         \
  209|      2|    };                                                                         \
  210|      2|    return &sha3_##bitlen##_md;                                                \
  211|      2|}
EVP_sha3_256:
  198|      2|const EVP_MD *EVP_sha3_##bitlen(void)                                          \
  199|      2|{                                                                              \
  200|      2|    static const EVP_MD sha3_##bitlen##_md = {                                 \
  201|      2|        NID_sha3_##bitlen,                                                     \
  202|      2|        NID_RSA_SHA3_##bitlen,                                                 \
  203|      2|        bitlen / 8,                                                            \
  204|      2|        EVP_MD_FLAG_DIGALGID_ABSENT,                                           \
  ------------------
  |  |  176|      2|#  define EVP_MD_FLAG_DIGALGID_ABSENT             0x0008
  ------------------
  205|      2|        EVP_ORIG_GLOBAL,                                                       \
  ------------------
  |  |  252|      2|#define EVP_ORIG_GLOBAL     1
  ------------------
  206|      2|        LEGACY_EVP_MD_METH_TABLE(sha3_int_init, sha3_int_update,               \
  ------------------
  |  |   40|      2|    init, update, final, NULL, NULL, blksz, 0, ctrl
  ------------------
  207|      2|                                 sha3_int_final, NULL,                         \
  208|      2|                                 (KECCAK1600_WIDTH - bitlen * 2) / 8),         \
  209|      2|    };                                                                         \
  210|      2|    return &sha3_##bitlen##_md;                                                \
  211|      2|}
EVP_sha3_384:
  198|      2|const EVP_MD *EVP_sha3_##bitlen(void)                                          \
  199|      2|{                                                                              \
  200|      2|    static const EVP_MD sha3_##bitlen##_md = {                                 \
  201|      2|        NID_sha3_##bitlen,                                                     \
  202|      2|        NID_RSA_SHA3_##bitlen,                                                 \
  203|      2|        bitlen / 8,                                                            \
  204|      2|        EVP_MD_FLAG_DIGALGID_ABSENT,                                           \
  ------------------
  |  |  176|      2|#  define EVP_MD_FLAG_DIGALGID_ABSENT             0x0008
  ------------------
  205|      2|        EVP_ORIG_GLOBAL,                                                       \
  ------------------
  |  |  252|      2|#define EVP_ORIG_GLOBAL     1
  ------------------
  206|      2|        LEGACY_EVP_MD_METH_TABLE(sha3_int_init, sha3_int_update,               \
  ------------------
  |  |   40|      2|    init, update, final, NULL, NULL, blksz, 0, ctrl
  ------------------
  207|      2|                                 sha3_int_final, NULL,                         \
  208|      2|                                 (KECCAK1600_WIDTH - bitlen * 2) / 8),         \
  209|      2|    };                                                                         \
  210|      2|    return &sha3_##bitlen##_md;                                                \
  211|      2|}
EVP_sha3_512:
  198|      2|const EVP_MD *EVP_sha3_##bitlen(void)                                          \
  199|      2|{                                                                              \
  200|      2|    static const EVP_MD sha3_##bitlen##_md = {                                 \
  201|      2|        NID_sha3_##bitlen,                                                     \
  202|      2|        NID_RSA_SHA3_##bitlen,                                                 \
  203|      2|        bitlen / 8,                                                            \
  204|      2|        EVP_MD_FLAG_DIGALGID_ABSENT,                                           \
  ------------------
  |  |  176|      2|#  define EVP_MD_FLAG_DIGALGID_ABSENT             0x0008
  ------------------
  205|      2|        EVP_ORIG_GLOBAL,                                                       \
  ------------------
  |  |  252|      2|#define EVP_ORIG_GLOBAL     1
  ------------------
  206|      2|        LEGACY_EVP_MD_METH_TABLE(sha3_int_init, sha3_int_update,               \
  ------------------
  |  |   40|      2|    init, update, final, NULL, NULL, blksz, 0, ctrl
  ------------------
  207|      2|                                 sha3_int_final, NULL,                         \
  208|      2|                                 (KECCAK1600_WIDTH - bitlen * 2) / 8),         \
  209|      2|    };                                                                         \
  210|      2|    return &sha3_##bitlen##_md;                                                \
  211|      2|}
EVP_shake128:
  213|      2|const EVP_MD *EVP_shake##bitlen(void)                                          \
  214|      2|{                                                                              \
  215|      2|    static const EVP_MD shake##bitlen##_md = {                                 \
  216|      2|        NID_shake##bitlen,                                                     \
  217|      2|        0,                                                                     \
  218|      2|        bitlen / 8,                                                            \
  219|      2|        EVP_MD_FLAG_XOF,                                                       \
  ------------------
  |  |  164|      2|#  define EVP_MD_FLAG_XOF         0x0002
  ------------------
  220|      2|        EVP_ORIG_GLOBAL,                                                       \
  ------------------
  |  |  252|      2|#define EVP_ORIG_GLOBAL     1
  ------------------
  221|      2|        LEGACY_EVP_MD_METH_TABLE(shake_init, sha3_int_update, sha3_int_final,  \
  ------------------
  |  |   40|      2|    init, update, final, NULL, NULL, blksz, 0, ctrl
  ------------------
  222|      2|                        shake_ctrl, (KECCAK1600_WIDTH - bitlen * 2) / 8),      \
  223|      2|    };                                                                         \
  224|      2|    return &shake##bitlen##_md;                                                \
  225|      2|}
EVP_shake256:
  213|      2|const EVP_MD *EVP_shake##bitlen(void)                                          \
  214|      2|{                                                                              \
  215|      2|    static const EVP_MD shake##bitlen##_md = {                                 \
  216|      2|        NID_shake##bitlen,                                                     \
  217|      2|        0,                                                                     \
  218|      2|        bitlen / 8,                                                            \
  219|      2|        EVP_MD_FLAG_XOF,                                                       \
  ------------------
  |  |  164|      2|#  define EVP_MD_FLAG_XOF         0x0002
  ------------------
  220|      2|        EVP_ORIG_GLOBAL,                                                       \
  ------------------
  |  |  252|      2|#define EVP_ORIG_GLOBAL     1
  ------------------
  221|      2|        LEGACY_EVP_MD_METH_TABLE(shake_init, sha3_int_update, sha3_int_final,  \
  ------------------
  |  |   40|      2|    init, update, final, NULL, NULL, blksz, 0, ctrl
  ------------------
  222|      2|                        shake_ctrl, (KECCAK1600_WIDTH - bitlen * 2) / 8),      \
  223|      2|    };                                                                         \
  224|      2|    return &shake##bitlen##_md;                                                \
  225|      2|}

EVP_whirlpool:
   33|      2|{
   34|      2|    return &whirlpool_md;
   35|      2|}

EVP_add_cipher:
   20|    288|{
   21|    288|    int r;
   22|       |
   23|    288|    if (c == NULL)
  ------------------
  |  Branch (23:9): [True: 0, False: 288]
  ------------------
   24|      0|        return 0;
   25|       |
   26|    288|    r = OBJ_NAME_add(OBJ_nid2sn(c->nid), OBJ_NAME_TYPE_CIPHER_METH,
  ------------------
  |  |   26|    288|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  ------------------
   27|    288|                     (const char *)c);
   28|    288|    if (r == 0)
  ------------------
  |  Branch (28:9): [True: 0, False: 288]
  ------------------
   29|      0|        return 0;
   30|    288|    r = OBJ_NAME_add(OBJ_nid2ln(c->nid), OBJ_NAME_TYPE_CIPHER_METH,
  ------------------
  |  |   26|    288|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  ------------------
   31|    288|                     (const char *)c);
   32|    288|    return r;
   33|    288|}
EVP_add_digest:
   36|     44|{
   37|     44|    int r;
   38|     44|    const char *name;
   39|       |
   40|     44|    name = OBJ_nid2sn(md->type);
   41|     44|    r = OBJ_NAME_add(name, OBJ_NAME_TYPE_MD_METH, (const char *)md);
  ------------------
  |  |   25|     44|# define OBJ_NAME_TYPE_MD_METH           0x01
  ------------------
   42|     44|    if (r == 0)
  ------------------
  |  Branch (42:9): [True: 0, False: 44]
  ------------------
   43|      0|        return 0;
   44|     44|    r = OBJ_NAME_add(OBJ_nid2ln(md->type), OBJ_NAME_TYPE_MD_METH,
  ------------------
  |  |   25|     44|# define OBJ_NAME_TYPE_MD_METH           0x01
  ------------------
   45|     44|                     (const char *)md);
   46|     44|    if (r == 0)
  ------------------
  |  Branch (46:9): [True: 0, False: 44]
  ------------------
   47|      0|        return 0;
   48|       |
   49|     44|    if (md->pkey_type && md->type != md->pkey_type) {
  ------------------
  |  Branch (49:9): [True: 34, False: 10]
  |  Branch (49:26): [True: 32, False: 2]
  ------------------
   50|     32|        r = OBJ_NAME_add(OBJ_nid2sn(md->pkey_type),
   51|     32|                         OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   25|     32|# define OBJ_NAME_TYPE_MD_METH           0x01
  ------------------
                                       OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   33|     32|# define OBJ_NAME_ALIAS                  0x8000
  ------------------
   52|     32|        if (r == 0)
  ------------------
  |  Branch (52:13): [True: 0, False: 32]
  ------------------
   53|      0|            return 0;
   54|     32|        r = OBJ_NAME_add(OBJ_nid2ln(md->pkey_type),
   55|     32|                         OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   25|     32|# define OBJ_NAME_TYPE_MD_METH           0x01
  ------------------
                                       OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   33|     32|# define OBJ_NAME_ALIAS                  0x8000
  ------------------
   56|     32|    }
   57|     44|    return r;
   58|     44|}
evp_cleanup_int:
  154|      2|{
  155|      2|    OBJ_NAME_cleanup(OBJ_NAME_TYPE_KDF_METH);
  ------------------
  |  |   30|      2|# define OBJ_NAME_TYPE_KDF_METH          0x06
  ------------------
  156|      2|    OBJ_NAME_cleanup(OBJ_NAME_TYPE_CIPHER_METH);
  ------------------
  |  |   26|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  ------------------
  157|      2|    OBJ_NAME_cleanup(OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   25|      2|# define OBJ_NAME_TYPE_MD_METH           0x01
  ------------------
  158|       |    /*
  159|       |     * The above calls will only clean out the contents of the name hash
  160|       |     * table, but not the hash table itself.  The following line does that
  161|       |     * part.  -- Richard Levitte
  162|       |     */
  163|      2|    OBJ_NAME_cleanup(-1);
  164|       |
  165|      2|    EVP_PBE_cleanup();
  166|      2|    OBJ_sigid_free();
  167|       |
  168|      2|    evp_app_cleanup_int();
  169|      2|}

evp_app_cleanup_int:
  618|      2|{
  619|      2|    if (app_pkey_methods != NULL)
  ------------------
  |  Branch (619:9): [True: 0, False: 2]
  ------------------
  620|      0|        sk_EVP_PKEY_METHOD_pop_free(app_pkey_methods, EVP_PKEY_meth_free);
  621|      2|}

ossl_do_ex_data_init:
   15|      4|{
   16|      4|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
   17|       |
   18|      4|    if (global == NULL)
  ------------------
  |  Branch (18:9): [True: 0, False: 4]
  ------------------
   19|      0|        return 0;
   20|       |
   21|      4|    global->ex_data_lock = CRYPTO_THREAD_lock_new();
   22|      4|    return global->ex_data_lock != NULL;
   23|      4|}
ossl_crypto_cleanup_all_ex_data_int:
   73|      2|{
   74|      2|    int i;
   75|      2|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
   76|       |
   77|      2|    if (global == NULL)
  ------------------
  |  Branch (77:9): [True: 0, False: 2]
  ------------------
   78|      0|        return;
   79|       |
   80|     38|    for (i = 0; i < CRYPTO_EX_INDEX__COUNT; ++i) {
  ------------------
  |  |  247|     38|# define CRYPTO_EX_INDEX__COUNT          18
  ------------------
  |  Branch (80:17): [True: 36, False: 2]
  ------------------
   81|     36|        EX_CALLBACKS *ip = &global->ex_data[i];
   82|       |
   83|     36|        sk_EX_CALLBACK_pop_free(ip->meth, cleanup_cb);
   84|     36|        ip->meth = NULL;
   85|     36|    }
   86|       |
   87|      2|    CRYPTO_THREAD_lock_free(global->ex_data_lock);
   88|      2|    global->ex_data_lock = NULL;
   89|      2|}

ossl_safe_getenv:
   19|      2|{
   20|       |#if defined(_WIN32) && defined(CP_UTF8) && !defined(_WIN32_WCE)
   21|       |    if (GetEnvironmentVariableW(L"OPENSSL_WIN32_UTF8", NULL, 0) != 0) {
   22|       |        char *val = NULL;
   23|       |        int vallen = 0;
   24|       |        WCHAR *namew = NULL;
   25|       |        WCHAR *valw = NULL;
   26|       |        DWORD envlen = 0;
   27|       |        DWORD dwFlags = MB_ERR_INVALID_CHARS;
   28|       |        int rsize, fsize;
   29|       |        UINT curacp;
   30|       |
   31|       |        curacp = GetACP();
   32|       |
   33|       |        /*
   34|       |         * For the code pages listed below, dwFlags must be set to 0.
   35|       |         * Otherwise, the function fails with ERROR_INVALID_FLAGS.
   36|       |         */
   37|       |        if (curacp == 50220 || curacp == 50221 || curacp == 50222 ||
   38|       |            curacp == 50225 || curacp == 50227 || curacp == 50229 ||
   39|       |            (57002 <= curacp && curacp <=57011) || curacp == 65000 ||
   40|       |            curacp == 42)
   41|       |            dwFlags = 0;
   42|       |
   43|       |        /* query for buffer len */
   44|       |        rsize = MultiByteToWideChar(curacp, dwFlags, name, -1, NULL, 0);
   45|       |        /* if name is valid string and can be converted to wide string */
   46|       |        if (rsize > 0)
   47|       |            namew = _malloca(rsize * sizeof(WCHAR));
   48|       |
   49|       |        if (NULL != namew) {
   50|       |            /* convert name to wide string */
   51|       |            fsize = MultiByteToWideChar(curacp, dwFlags, name, -1, namew, rsize);
   52|       |            /* if conversion is ok, then determine value string size in wchars */
   53|       |            if (fsize > 0)
   54|       |                envlen = GetEnvironmentVariableW(namew, NULL, 0);
   55|       |        }
   56|       |
   57|       |        if (envlen > 0)
   58|       |            valw = _malloca(envlen * sizeof(WCHAR));
   59|       |
   60|       |        if (NULL != valw) {
   61|       |            /* if can get env value as wide string */
   62|       |            if (GetEnvironmentVariableW(namew, valw, envlen) < envlen) {
   63|       |                /* determine value string size in utf-8 */
   64|       |                vallen = WideCharToMultiByte(CP_UTF8, 0, valw, -1, NULL, 0,
   65|       |                                             NULL, NULL);
   66|       |            }
   67|       |        }
   68|       |
   69|       |        if (vallen > 0)
   70|       |            val = OPENSSL_malloc(vallen);
   71|       |
   72|       |        if (NULL != val) {
   73|       |            /* convert value string from wide to utf-8 */
   74|       |            if (WideCharToMultiByte(CP_UTF8, 0, valw, -1, val, vallen,
   75|       |                                    NULL, NULL) == 0) {
   76|       |                OPENSSL_free(val);
   77|       |                val = NULL;
   78|       |            }
   79|       |        }
   80|       |
   81|       |        if (NULL != namew)
   82|       |            _freea(namew);
   83|       |
   84|       |        if (NULL != valw)
   85|       |            _freea(valw);
   86|       |
   87|       |        return val;
   88|       |    }
   89|       |#endif
   90|       |
   91|      2|#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
   92|      2|# if __GLIBC_PREREQ(2, 17)
   93|      2|#  define SECURE_GETENV
   94|      2|    return secure_getenv(name);
   95|      2|# endif
   96|      2|#endif
   97|       |
   98|       |#ifndef SECURE_GETENV
   99|       |    if (OPENSSL_issetugid())
  100|       |        return NULL;
  101|       |    return getenv(name);
  102|       |#endif
  103|      2|}

ossl_err_load_HTTP_strings:
   80|      2|{
   81|      2|# ifndef OPENSSL_NO_ERR
   82|      2|    if (ERR_reason_error_string(HTTP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (82:9): [True: 2, False: 0]
  ------------------
   83|      2|        ERR_load_strings_const(HTTP_str_reasons);
   84|      2|# endif
   85|      2|    return 1;
   86|      2|}

ossl_indicator_set_callback_new:
   22|      4|{
   23|      4|    INDICATOR_CB *cb;
   24|       |
   25|      4|    cb = OPENSSL_zalloc(sizeof(*cb));
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   26|      4|    return cb;
   27|      4|}
ossl_indicator_set_callback_free:
   30|      2|{
   31|      2|    OPENSSL_free(cb);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   32|      2|}

OPENSSL_cleanup:
  354|      2|{
  355|      2|    OPENSSL_INIT_STOP *currhandler, *lasthandler;
  356|       |
  357|       |    /*
  358|       |     * At some point we should consider looking at this function with a view to
  359|       |     * moving most/all of this into onfree handlers in OSSL_LIB_CTX.
  360|       |     */
  361|       |
  362|       |    /* If we've not been inited then no need to deinit */
  363|      2|    if (!base_inited)
  ------------------
  |  Branch (363:9): [True: 0, False: 2]
  ------------------
  364|      0|        return;
  365|       |
  366|       |    /* Might be explicitly called and also by atexit */
  367|      2|    if (stopped)
  ------------------
  |  Branch (367:9): [True: 0, False: 2]
  ------------------
  368|      0|        return;
  369|      2|    stopped = 1;
  370|       |
  371|       |    /*
  372|       |     * Thread stop may not get automatically called by the thread library for
  373|       |     * the very last thread in some situations, so call it directly.
  374|       |     */
  375|      2|    OPENSSL_thread_stop();
  376|       |
  377|      2|    currhandler = stop_handlers;
  378|      2|    while (currhandler != NULL) {
  ------------------
  |  Branch (378:12): [True: 0, False: 2]
  ------------------
  379|      0|        currhandler->handler();
  380|      0|        lasthandler = currhandler;
  381|      0|        currhandler = currhandler->next;
  382|      0|        OPENSSL_free(lasthandler);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  383|      0|    }
  384|      2|    stop_handlers = NULL;
  385|       |
  386|      2|    CRYPTO_THREAD_lock_free(optsdone_lock);
  387|      2|    optsdone_lock = NULL;
  388|      2|    CRYPTO_THREAD_lock_free(init_lock);
  389|      2|    init_lock = NULL;
  390|       |
  391|      2|    CRYPTO_THREAD_cleanup_local(&in_init_config_local);
  392|       |
  393|       |    /*
  394|       |     * We assume we are single-threaded for this function, i.e. no race
  395|       |     * conditions for the various "*_inited" vars below.
  396|       |     */
  397|       |
  398|      2|#ifndef OPENSSL_NO_COMP
  399|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_comp_zlib_cleanup()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  400|      2|    ossl_comp_zlib_cleanup();
  401|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_comp_brotli_cleanup()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  402|      2|    ossl_comp_brotli_cleanup();
  403|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_comp_zstd_cleanup()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  404|      2|    ossl_comp_zstd_cleanup();
  405|      2|#endif
  406|       |
  407|      2|    if (async_inited) {
  ------------------
  |  Branch (407:9): [True: 2, False: 0]
  ------------------
  408|      2|        OSSL_TRACE(INIT, "OPENSSL_cleanup: async_deinit()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  409|      2|        async_deinit();
  410|      2|    }
  411|       |
  412|       |    /*
  413|       |     * Note that cleanup order is important:
  414|       |     * - ossl_rand_cleanup_int could call an ENGINE's RAND cleanup function so
  415|       |     * must be called before engine_cleanup_int()
  416|       |     * - ENGINEs use CRYPTO_EX_DATA and therefore, must be cleaned up
  417|       |     * before the ex data handlers are wiped during default ossl_lib_ctx deinit.
  418|       |     * - ossl_config_modules_free() can end up in ENGINE code so must be called
  419|       |     * before engine_cleanup_int()
  420|       |     * - ENGINEs and additional EVP algorithms might use added OIDs names so
  421|       |     * ossl_obj_cleanup_int() must be called last
  422|       |     */
  423|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_rand_cleanup_int()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  424|      2|    ossl_rand_cleanup_int();
  425|       |
  426|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_config_modules_free()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  427|      2|    ossl_config_modules_free();
  428|       |
  429|      2|#ifndef OPENSSL_NO_ENGINE
  430|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: engine_cleanup_int()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  431|      2|    engine_cleanup_int();
  432|      2|#endif
  433|       |
  434|      2|#ifndef OPENSSL_NO_DEPRECATED_3_0
  435|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_store_cleanup_int()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  436|      2|    ossl_store_cleanup_int();
  437|      2|#endif
  438|       |
  439|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_lib_ctx_default_deinit()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  440|      2|    ossl_lib_ctx_default_deinit();
  441|       |
  442|      2|    ossl_cleanup_thread();
  443|       |
  444|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: bio_cleanup()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  445|      2|    bio_cleanup();
  446|       |
  447|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: evp_cleanup_int()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  448|      2|    evp_cleanup_int();
  449|       |
  450|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_obj_cleanup_int()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  451|      2|    ossl_obj_cleanup_int();
  452|       |
  453|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: err_int()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  454|      2|    err_cleanup();
  455|       |
  456|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: CRYPTO_secure_malloc_done()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  457|      2|    CRYPTO_secure_malloc_done();
  458|       |
  459|      2|#ifndef OPENSSL_NO_CMP
  460|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: OSSL_CMP_log_close()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  461|      2|    OSSL_CMP_log_close();
  462|      2|#endif
  463|       |
  464|      2|    OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_trace_cleanup()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  465|      2|    ossl_trace_cleanup();
  466|       |
  467|      2|    base_inited = 0;
  468|      2|}
OPENSSL_init_crypto:
  476|     44|{
  477|     44|    uint64_t tmp;
  478|     44|    int aloaddone = 0;
  479|       |
  480|       |   /* Applications depend on 0 being returned when cleanup was already done */
  481|     44|    if (stopped) {
  ------------------
  |  Branch (481:9): [True: 0, False: 44]
  ------------------
  482|      0|        if (!(opts & OPENSSL_INIT_BASE_ONLY))
  ------------------
  |  |   31|      0|# define OPENSSL_INIT_BASE_ONLY              0x00040000L
  ------------------
  |  Branch (482:13): [True: 0, False: 0]
  ------------------
  483|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  484|      0|        return 0;
  485|      0|    }
  486|       |
  487|       |    /*
  488|       |     * We ignore failures from this function. It is probably because we are
  489|       |     * on a platform that doesn't support lockless atomic loads (we may not
  490|       |     * have created optsdone_lock yet so we can't use it). This is just an
  491|       |     * optimisation to skip the full checks in this function if we don't need
  492|       |     * to, so we carry on regardless in the event of failure.
  493|       |     *
  494|       |     * There could be a race here with other threads, so that optsdone has not
  495|       |     * been updated yet, even though the options have in fact been initialised.
  496|       |     * This doesn't matter - it just means we will run the full function
  497|       |     * unnecessarily - but all the critical code is contained in RUN_ONCE
  498|       |     * functions anyway so we are safe.
  499|       |     */
  500|     44|    if (CRYPTO_atomic_load(&optsdone, &tmp, NULL)) {
  ------------------
  |  Branch (500:9): [True: 44, False: 0]
  ------------------
  501|     44|        if ((tmp & opts) == opts)
  ------------------
  |  Branch (501:13): [True: 0, False: 44]
  ------------------
  502|      0|            return 1;
  503|     44|        aloaddone = 1;
  504|     44|    }
  505|       |
  506|       |    /*
  507|       |     * At some point we should look at this function with a view to moving
  508|       |     * most/all of this into OSSL_LIB_CTX.
  509|       |     *
  510|       |     * When the caller specifies OPENSSL_INIT_BASE_ONLY, that should be the
  511|       |     * *only* option specified.  With that option we return immediately after
  512|       |     * doing the requested limited initialization.  Note that
  513|       |     * err_shelve_state() called by us via ossl_init_load_crypto_nodelete()
  514|       |     * re-enters OPENSSL_init_crypto() with OPENSSL_INIT_BASE_ONLY, but with
  515|       |     * base already initialized this is a harmless NOOP.
  516|       |     *
  517|       |     * If we remain the only caller of err_shelve_state() the recursion should
  518|       |     * perhaps be removed, but if in doubt, it can be left in place.
  519|       |     */
  520|     44|    if (!RUN_ONCE(&base, ossl_init_base))
  ------------------
  |  |  130|     44|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 44, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (520:9): [True: 0, False: 44]
  ------------------
  521|      0|        return 0;
  522|       |
  523|     44|    if (opts & OPENSSL_INIT_BASE_ONLY)
  ------------------
  |  |   31|     44|# define OPENSSL_INIT_BASE_ONLY              0x00040000L
  ------------------
  |  Branch (523:9): [True: 36, False: 8]
  ------------------
  524|     36|        return 1;
  525|       |
  526|       |    /*
  527|       |     * optsdone_lock should definitely be set up now, so we can now repeat the
  528|       |     * same check from above but be sure that it will work even on platforms
  529|       |     * without lockless CRYPTO_atomic_load
  530|       |     */
  531|      8|    if (!aloaddone) {
  ------------------
  |  Branch (531:9): [True: 0, False: 8]
  ------------------
  532|      0|        if (!CRYPTO_atomic_load(&optsdone, &tmp, optsdone_lock))
  ------------------
  |  Branch (532:13): [True: 0, False: 0]
  ------------------
  533|      0|            return 0;
  534|      0|        if ((tmp & opts) == opts)
  ------------------
  |  Branch (534:13): [True: 0, False: 0]
  ------------------
  535|      0|            return 1;
  536|      0|    }
  537|       |
  538|       |    /*
  539|       |     * Now we don't always set up exit handlers, the INIT_BASE_ONLY calls
  540|       |     * should not have the side-effect of setting up exit handlers, and
  541|       |     * therefore, this code block is below the INIT_BASE_ONLY-conditioned early
  542|       |     * return above.
  543|       |     */
  544|      8|    if ((opts & OPENSSL_INIT_NO_ATEXIT) != 0) {
  ------------------
  |  |  481|      8|# define OPENSSL_INIT_NO_ATEXIT              0x00080000L
  ------------------
  |  Branch (544:9): [True: 0, False: 8]
  ------------------
  545|      0|        if (!RUN_ONCE_ALT(&register_atexit, ossl_init_no_register_atexit,
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (545:13): [True: 0, False: 0]
  ------------------
  546|      0|                          ossl_init_register_atexit))
  547|      0|            return 0;
  548|      8|    } else if (!RUN_ONCE(&register_atexit, ossl_init_register_atexit)) {
  ------------------
  |  |  130|      8|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 8, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (548:16): [True: 0, False: 8]
  ------------------
  549|      0|        return 0;
  550|      0|    }
  551|       |
  552|      8|    if (!RUN_ONCE(&load_crypto_nodelete, ossl_init_load_crypto_nodelete))
  ------------------
  |  |  130|      8|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 8, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (552:9): [True: 0, False: 8]
  ------------------
  553|      0|        return 0;
  554|       |
  555|      8|    if ((opts & OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS)
  ------------------
  |  |  462|      8|# define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L
  ------------------
  |  Branch (555:9): [True: 0, False: 8]
  ------------------
  556|      8|            && !RUN_ONCE_ALT(&load_crypto_strings,
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (556:16): [True: 0, False: 0]
  ------------------
  557|      8|                             ossl_init_no_load_crypto_strings,
  558|      8|                             ossl_init_load_crypto_strings))
  559|      0|        return 0;
  560|       |
  561|      8|    if ((opts & OPENSSL_INIT_LOAD_CRYPTO_STRINGS)
  ------------------
  |  |  463|      8|# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS    0x00000002L
  ------------------
  |  Branch (561:9): [True: 4, False: 4]
  ------------------
  562|      8|            && !RUN_ONCE(&load_crypto_strings, ossl_init_load_crypto_strings))
  ------------------
  |  |  130|      4|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 4, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (562:16): [True: 0, False: 4]
  ------------------
  563|      0|        return 0;
  564|       |
  565|      8|    if ((opts & OPENSSL_INIT_NO_ADD_ALL_CIPHERS)
  ------------------
  |  |  466|      8|# define OPENSSL_INIT_NO_ADD_ALL_CIPHERS     0x00000010L
  ------------------
  |  Branch (565:9): [True: 0, False: 8]
  ------------------
  566|      8|            && !RUN_ONCE_ALT(&add_all_ciphers, ossl_init_no_add_all_ciphers,
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (566:16): [True: 0, False: 0]
  ------------------
  567|      8|                             ossl_init_add_all_ciphers))
  568|      0|        return 0;
  569|       |
  570|      8|    if ((opts & OPENSSL_INIT_ADD_ALL_CIPHERS)
  ------------------
  |  |  464|      8|# define OPENSSL_INIT_ADD_ALL_CIPHERS        0x00000004L
  ------------------
  |  Branch (570:9): [True: 2, False: 6]
  ------------------
  571|      8|            && !RUN_ONCE(&add_all_ciphers, ossl_init_add_all_ciphers))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (571:16): [True: 0, False: 2]
  ------------------
  572|      0|        return 0;
  573|       |
  574|      8|    if ((opts & OPENSSL_INIT_NO_ADD_ALL_DIGESTS)
  ------------------
  |  |  467|      8|# define OPENSSL_INIT_NO_ADD_ALL_DIGESTS     0x00000020L
  ------------------
  |  Branch (574:9): [True: 0, False: 8]
  ------------------
  575|      8|            && !RUN_ONCE_ALT(&add_all_digests, ossl_init_no_add_all_digests,
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (575:16): [True: 0, False: 0]
  ------------------
  576|      8|                             ossl_init_add_all_digests))
  577|      0|        return 0;
  578|       |
  579|      8|    if ((opts & OPENSSL_INIT_ADD_ALL_DIGESTS)
  ------------------
  |  |  465|      8|# define OPENSSL_INIT_ADD_ALL_DIGESTS        0x00000008L
  ------------------
  |  Branch (579:9): [True: 2, False: 6]
  ------------------
  580|      8|            && !RUN_ONCE(&add_all_digests, ossl_init_add_all_digests))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (580:16): [True: 0, False: 2]
  ------------------
  581|      0|        return 0;
  582|       |
  583|      8|    if ((opts & OPENSSL_INIT_ATFORK)
  ------------------
  |  |  479|      8|# define OPENSSL_INIT_ATFORK                 0x00020000L
  ------------------
  |  Branch (583:9): [True: 0, False: 8]
  ------------------
  584|      8|            && !openssl_init_fork_handlers())
  ------------------
  |  Branch (584:16): [True: 0, False: 0]
  ------------------
  585|      0|        return 0;
  586|       |
  587|      8|    if ((opts & OPENSSL_INIT_NO_LOAD_CONFIG)
  ------------------
  |  |  469|      8|# define OPENSSL_INIT_NO_LOAD_CONFIG         0x00000080L
  ------------------
  |  Branch (587:9): [True: 0, False: 8]
  ------------------
  588|      8|            && !RUN_ONCE_ALT(&config, ossl_init_no_config, ossl_init_config))
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (588:16): [True: 0, False: 0]
  ------------------
  589|      0|        return 0;
  590|       |
  591|      8|    if (opts & OPENSSL_INIT_LOAD_CONFIG) {
  ------------------
  |  |  468|      8|# define OPENSSL_INIT_LOAD_CONFIG            0x00000040L
  ------------------
  |  Branch (591:9): [True: 4, False: 4]
  ------------------
  592|      4|        int loading = CRYPTO_THREAD_get_local(&in_init_config_local) != NULL;
  593|       |
  594|       |        /* If called recursively from OBJ_ calls, just skip it. */
  595|      4|        if (!loading) {
  ------------------
  |  Branch (595:13): [True: 2, False: 2]
  ------------------
  596|      2|            int ret;
  597|       |
  598|      2|            if (!CRYPTO_THREAD_set_local(&in_init_config_local, (void *)-1))
  ------------------
  |  Branch (598:17): [True: 0, False: 2]
  ------------------
  599|      0|                return 0;
  600|      2|            if (settings == NULL) {
  ------------------
  |  Branch (600:17): [True: 2, False: 0]
  ------------------
  601|      2|                ret = RUN_ONCE(&config, ossl_init_config);
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  602|      2|            } else {
  603|      0|                if (!CRYPTO_THREAD_write_lock(init_lock))
  ------------------
  |  Branch (603:21): [True: 0, False: 0]
  ------------------
  604|      0|                    return 0;
  605|      0|                conf_settings = settings;
  606|      0|                ret = RUN_ONCE_ALT(&config, ossl_init_config_settings,
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  607|      0|                                   ossl_init_config);
  608|      0|                conf_settings = NULL;
  609|      0|                CRYPTO_THREAD_unlock(init_lock);
  610|      0|            }
  611|       |
  612|      2|            if (ret <= 0)
  ------------------
  |  Branch (612:17): [True: 0, False: 2]
  ------------------
  613|      0|                return 0;
  614|      2|        }
  615|      4|    }
  616|       |
  617|      8|    if ((opts & OPENSSL_INIT_ASYNC)
  ------------------
  |  |  470|      8|# define OPENSSL_INIT_ASYNC                  0x00000100L
  ------------------
  |  Branch (617:9): [True: 2, False: 6]
  ------------------
  618|      8|            && !RUN_ONCE(&async, ossl_init_async))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (618:16): [True: 0, False: 2]
  ------------------
  619|      0|        return 0;
  620|       |
  621|      8|#ifndef OPENSSL_NO_ENGINE
  622|      8|    if ((opts & OPENSSL_INIT_ENGINE_OPENSSL)
  ------------------
  |  |  473|      8|# define OPENSSL_INIT_ENGINE_OPENSSL         0x00000800L
  ------------------
  |  Branch (622:9): [True: 0, False: 8]
  ------------------
  623|      8|            && !RUN_ONCE(&engine_openssl, ossl_init_engine_openssl))
  ------------------
  |  |  130|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (623:16): [True: 0, False: 0]
  ------------------
  624|      0|        return 0;
  625|      8|# ifndef OPENSSL_NO_RDRAND
  626|      8|    if ((opts & OPENSSL_INIT_ENGINE_RDRAND)
  ------------------
  |  |  471|      8|# define OPENSSL_INIT_ENGINE_RDRAND          0x00000200L
  ------------------
  |  Branch (626:9): [True: 0, False: 8]
  ------------------
  627|      8|            && !RUN_ONCE(&engine_rdrand, ossl_init_engine_rdrand))
  ------------------
  |  |  130|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (627:16): [True: 0, False: 0]
  ------------------
  628|      0|        return 0;
  629|      8|# endif
  630|      8|    if ((opts & OPENSSL_INIT_ENGINE_DYNAMIC)
  ------------------
  |  |  472|      8|# define OPENSSL_INIT_ENGINE_DYNAMIC         0x00000400L
  ------------------
  |  Branch (630:9): [True: 0, False: 8]
  ------------------
  631|      8|            && !RUN_ONCE(&engine_dynamic, ossl_init_engine_dynamic))
  ------------------
  |  |  130|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (631:16): [True: 0, False: 0]
  ------------------
  632|      0|        return 0;
  633|      8|# ifndef OPENSSL_NO_STATIC_ENGINE
  634|       |#  ifndef OPENSSL_NO_DEVCRYPTOENG
  635|       |    if ((opts & OPENSSL_INIT_ENGINE_CRYPTODEV)
  636|       |            && !RUN_ONCE(&engine_devcrypto, ossl_init_engine_devcrypto))
  637|       |        return 0;
  638|       |#  endif
  639|      8|#  if !defined(OPENSSL_NO_PADLOCKENG)
  640|      8|    if ((opts & OPENSSL_INIT_ENGINE_PADLOCK)
  ------------------
  |  |  476|      8|# define OPENSSL_INIT_ENGINE_PADLOCK         0x00004000L
  ------------------
  |  Branch (640:9): [True: 0, False: 8]
  ------------------
  641|      8|            && !RUN_ONCE(&engine_padlock, ossl_init_engine_padlock))
  ------------------
  |  |  130|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (641:16): [True: 0, False: 0]
  ------------------
  642|      0|        return 0;
  643|      8|#  endif
  644|       |#  if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
  645|       |    if ((opts & OPENSSL_INIT_ENGINE_CAPI)
  646|       |            && !RUN_ONCE(&engine_capi, ossl_init_engine_capi))
  647|       |        return 0;
  648|       |#  endif
  649|      8|#  if !defined(OPENSSL_NO_AFALGENG)
  650|      8|    if ((opts & OPENSSL_INIT_ENGINE_AFALG)
  ------------------
  |  |  477|      8|# define OPENSSL_INIT_ENGINE_AFALG           0x00008000L
  ------------------
  |  Branch (650:9): [True: 0, False: 8]
  ------------------
  651|      8|            && !RUN_ONCE(&engine_afalg, ossl_init_engine_afalg))
  ------------------
  |  |  130|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (651:16): [True: 0, False: 0]
  ------------------
  652|      0|        return 0;
  653|      8|#  endif
  654|      8|# endif
  655|      8|    if (opts & (OPENSSL_INIT_ENGINE_ALL_BUILTIN
  ------------------
  |  |  493|      8|    (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
  |  |  ------------------
  |  |  |  |  471|      8|# define OPENSSL_INIT_ENGINE_RDRAND          0x00000200L
  |  |  ------------------
  |  |                   (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
  |  |  ------------------
  |  |  |  |  472|      8|# define OPENSSL_INIT_ENGINE_DYNAMIC         0x00000400L
  |  |  ------------------
  |  |  494|      8|    | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | \
  |  |  ------------------
  |  |  |  |  474|      8|# define OPENSSL_INIT_ENGINE_CRYPTODEV       0x00001000L
  |  |  ------------------
  |  |                   | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | \
  |  |  ------------------
  |  |  |  |  475|      8|# define OPENSSL_INIT_ENGINE_CAPI            0x00002000L
  |  |  ------------------
  |  |  495|      8|    OPENSSL_INIT_ENGINE_PADLOCK)
  |  |  ------------------
  |  |  |  |  476|      8|# define OPENSSL_INIT_ENGINE_PADLOCK         0x00004000L
  |  |  ------------------
  ------------------
  |  Branch (655:9): [True: 0, False: 8]
  ------------------
  656|      8|                | OPENSSL_INIT_ENGINE_OPENSSL
  ------------------
  |  |  473|      8|# define OPENSSL_INIT_ENGINE_OPENSSL         0x00000800L
  ------------------
  657|      8|                | OPENSSL_INIT_ENGINE_AFALG)) {
  ------------------
  |  |  477|      8|# define OPENSSL_INIT_ENGINE_AFALG           0x00008000L
  ------------------
  658|      0|        ENGINE_register_all_complete();
  659|      0|    }
  660|      8|#endif
  661|       |
  662|      8|    if (!CRYPTO_atomic_or(&optsdone, opts, &tmp, optsdone_lock))
  ------------------
  |  Branch (662:9): [True: 0, False: 8]
  ------------------
  663|      0|        return 0;
  664|       |
  665|      8|    return 1;
  666|      8|}
init.c:ossl_init_base:
   56|      2|{
   57|       |    /* no need to init trace */
   58|       |
   59|      2|    OSSL_TRACE(INIT, "ossl_init_base: setting up stop handlers\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   60|       |#ifndef OPENSSL_NO_CRYPTO_MDEBUG
   61|       |    ossl_malloc_setup_failures();
   62|       |#endif
   63|       |
   64|      2|    if ((optsdone_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (64:9): [True: 0, False: 2]
  ------------------
   65|      2|        || (init_lock = CRYPTO_THREAD_lock_new()) == NULL)
  ------------------
  |  Branch (65:12): [True: 0, False: 2]
  ------------------
   66|      0|        goto err;
   67|       |
   68|      2|    OPENSSL_cpuid_setup();
   69|       |
   70|      2|    if (!ossl_init_thread())
  ------------------
  |  Branch (70:9): [True: 0, False: 2]
  ------------------
   71|      0|        goto err;
   72|       |
   73|      2|    if (!CRYPTO_THREAD_init_local(&in_init_config_local, NULL))
  ------------------
  |  Branch (73:9): [True: 0, False: 2]
  ------------------
   74|      0|        goto err;
   75|       |
   76|      2|    base_inited = 1;
   77|      2|    return 1;
   78|       |
   79|      0|err:
   80|      0|    OSSL_TRACE(INIT, "ossl_init_base failed!\n");
  ------------------
  |  |  287|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      0|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   81|      0|    CRYPTO_THREAD_lock_free(optsdone_lock);
   82|      0|    optsdone_lock = NULL;
   83|      0|    CRYPTO_THREAD_lock_free(init_lock);
   84|      0|    init_lock = NULL;
   85|       |
   86|      0|    return 0;
   87|      2|}
init.c:ossl_init_register_atexit:
   99|      2|{
  100|      2|#ifndef OPENSSL_NO_ATEXIT
  101|       |# ifdef OPENSSL_INIT_DEBUG
  102|       |    fprintf(stderr, "OPENSSL_INIT: ossl_init_register_atexit()\n");
  103|       |# endif
  104|      2|# ifndef OPENSSL_SYS_UEFI
  105|       |#  if defined(_WIN32) && !defined(__BORLANDC__)
  106|       |    /* We use _onexit() in preference because it gets called on DLL unload */
  107|       |    if (_onexit(win32atexit) == NULL)
  108|       |        return 0;
  109|       |#  else
  110|      2|    if (atexit(OPENSSL_cleanup) != 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 2]
  ------------------
  111|      0|        return 0;
  112|      2|#  endif
  113|      2|# endif
  114|      2|#endif
  115|       |
  116|      2|    return 1;
  117|      2|}
init.c:ossl_init_load_crypto_nodelete:
  131|      2|{
  132|      2|    OSSL_TRACE(INIT, "ossl_init_load_crypto_nodelete()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  133|       |
  134|       |#if !defined(OPENSSL_USE_NODELETE) \
  135|       |    && !defined(OPENSSL_NO_PINSHARED)
  136|       |# if defined(DSO_WIN32) && !defined(_WIN32_WCE)
  137|       |    {
  138|       |        HMODULE handle = NULL;
  139|       |        BOOL ret;
  140|       |
  141|       |        /* We don't use the DSO route for WIN32 because there is a better way */
  142|       |        ret = GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
  143|       |                                | GET_MODULE_HANDLE_EX_FLAG_PIN,
  144|       |                                (void *)&base_inited, &handle);
  145|       |
  146|       |        OSSL_TRACE1(INIT,
  147|       |                    "ossl_init_load_crypto_nodelete: "
  148|       |                    "obtained DSO reference? %s\n",
  149|       |                    (ret == TRUE ? "No!" : "Yes."));
  150|       |        return (ret == TRUE) ? 1 : 0;
  151|       |    }
  152|       |# elif !defined(DSO_NONE)
  153|       |    /*
  154|       |     * Deliberately leak a reference to ourselves. This will force the library
  155|       |     * to remain loaded until the atexit() handler is run at process exit.
  156|       |     */
  157|       |    {
  158|       |        DSO *dso;
  159|       |        void *err;
  160|       |
  161|       |        if (!err_shelve_state(&err))
  162|       |            return 0;
  163|       |
  164|       |        dso = DSO_dsobyaddr(&base_inited, DSO_FLAG_NO_UNLOAD_ON_FREE);
  165|       |        /*
  166|       |         * In case of No!, it is uncertain our exit()-handlers can still be
  167|       |         * called. After dlclose() the whole library might have been unloaded
  168|       |         * already.
  169|       |         */
  170|       |        OSSL_TRACE1(INIT, "obtained DSO reference? %s\n",
  171|       |                    (dso == NULL ? "No!" : "Yes."));
  172|       |        DSO_free(dso);
  173|       |        err_unshelve_state(err);
  174|       |    }
  175|       |# endif
  176|       |#endif
  177|       |
  178|      2|    return 1;
  179|      2|}
init.c:ossl_init_load_crypto_strings:
  184|      2|{
  185|      2|    int ret = 1;
  186|       |    /*
  187|       |     * OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time
  188|       |     * pulling in all the error strings during static linking
  189|       |     */
  190|      2|#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
  191|      2|    void *err;
  192|       |
  193|      2|    if (!err_shelve_state(&err))
  ------------------
  |  Branch (193:9): [True: 0, False: 2]
  ------------------
  194|      0|        return 0;
  195|       |
  196|      2|    OSSL_TRACE(INIT, "ossl_err_load_crypto_strings()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  197|      2|    ret = ossl_err_load_crypto_strings();
  198|       |
  199|      2|    err_unshelve_state(err);
  200|      2|#endif
  201|      2|    return ret;
  202|      2|}
init.c:ossl_init_add_all_ciphers:
  213|      2|{
  214|       |    /*
  215|       |     * OPENSSL_NO_AUTOALGINIT is provided here to prevent at compile time
  216|       |     * pulling in all the ciphers during static linking
  217|       |     */
  218|      2|#ifndef OPENSSL_NO_AUTOALGINIT
  219|      2|    OSSL_TRACE(INIT, "openssl_add_all_ciphers_int()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  220|      2|    openssl_add_all_ciphers_int();
  221|      2|#endif
  222|      2|    return 1;
  223|      2|}
init.c:ossl_init_add_all_digests:
  234|      2|{
  235|       |    /*
  236|       |     * OPENSSL_NO_AUTOALGINIT is provided here to prevent at compile time
  237|       |     * pulling in all the ciphers during static linking
  238|       |     */
  239|      2|#ifndef OPENSSL_NO_AUTOALGINIT
  240|      2|    OSSL_TRACE(INIT, "openssl_add_all_digests()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  241|      2|    openssl_add_all_digests_int();
  242|      2|#endif
  243|      2|    return 1;
  244|      2|}
init.c:ossl_init_config:
  257|      2|{
  258|      2|    int ret = ossl_config_int(NULL);
  259|       |
  260|      2|    config_inited = 1;
  261|      2|    return ret;
  262|      2|}
init.c:ossl_init_async:
  281|      2|{
  282|      2|    OSSL_TRACE(INIT, "async_init()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  283|      2|    if (!async_init())
  ------------------
  |  Branch (283:9): [True: 0, False: 2]
  ------------------
  284|      0|        return 0;
  285|      2|    async_inited = 1;
  286|      2|    return 1;
  287|      2|}

ossl_init_thread:
  203|      2|{
  204|      2|    if (!CRYPTO_THREAD_init_local(&destructor_key.value,
  ------------------
  |  Branch (204:9): [True: 0, False: 2]
  ------------------
  205|      2|                                  init_thread_destructor))
  206|      0|        return 0;
  207|       |
  208|      2|    return 1;
  209|      2|}
ossl_cleanup_thread:
  212|      2|{
  213|      2|    init_thread_deregister(NULL, 1);
  214|      2|    CRYPTO_THREAD_cleanup_local(&destructor_key.value);
  215|      2|    destructor_key.sane = -1;
  216|      2|}
OPENSSL_thread_stop:
  230|      2|{
  231|      2|    if (destructor_key.sane != -1) {
  ------------------
  |  Branch (231:9): [True: 2, False: 0]
  ------------------
  232|      2|        THREAD_EVENT_HANDLER **hands
  233|      2|            = init_get_thread_local(&destructor_key.value, 0, 0);
  234|      2|        init_thread_stop(NULL, hands);
  235|       |
  236|      2|        init_thread_remove_handlers(hands);
  237|      2|        OPENSSL_free(hands);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  238|      2|    }
  239|      2|}
ossl_ctx_thread_stop:
  242|      2|{
  243|      2|    if (destructor_key.sane != -1) {
  ------------------
  |  Branch (243:9): [True: 2, False: 0]
  ------------------
  244|      2|        THREAD_EVENT_HANDLER **hands
  245|      2|            = init_get_thread_local(&destructor_key.value, 0, 1);
  246|      2|        init_thread_stop(ctx, hands);
  247|      2|    }
  248|      2|}
ossl_init_thread_start:
  367|      2|{
  368|      2|    THREAD_EVENT_HANDLER **hands;
  369|      2|    THREAD_EVENT_HANDLER *hand;
  370|       |#ifdef FIPS_MODULE
  371|       |    OSSL_LIB_CTX *ctx = arg;
  372|       |
  373|       |    /*
  374|       |     * In FIPS mode the list of THREAD_EVENT_HANDLERs is unique per combination
  375|       |     * of OSSL_LIB_CTX and thread. This is because in FIPS mode each
  376|       |     * OSSL_LIB_CTX gets informed about thread stop events individually.
  377|       |     */
  378|       |    CRYPTO_THREAD_LOCAL *local
  379|       |        = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_THREAD_EVENT_HANDLER_INDEX);
  380|       |#else
  381|       |    /*
  382|       |     * Outside of FIPS mode the list of THREAD_EVENT_HANDLERs is unique per
  383|       |     * thread, but may hold multiple OSSL_LIB_CTXs. We only get told about
  384|       |     * thread stop events globally, so we have to ensure all affected
  385|       |     * OSSL_LIB_CTXs are informed.
  386|       |     */
  387|      2|    CRYPTO_THREAD_LOCAL *local = &destructor_key.value;
  388|      2|#endif
  389|       |
  390|      2|    hands = init_get_thread_local(local, 1, 0);
  391|      2|    if (hands == NULL)
  ------------------
  |  Branch (391:9): [True: 0, False: 2]
  ------------------
  392|      0|        return 0;
  393|       |
  394|       |#ifdef FIPS_MODULE
  395|       |    if (*hands == NULL) {
  396|       |        /*
  397|       |         * We've not yet registered any handlers for this thread. We need to get
  398|       |         * libcrypto to tell us about later thread stop events. c_thread_start
  399|       |         * is a callback to libcrypto defined in fipsprov.c
  400|       |         */
  401|       |        if (!ossl_thread_register_fips(ctx))
  402|       |            return 0;
  403|       |    }
  404|       |#endif
  405|       |
  406|      2|    hand = OPENSSL_malloc(sizeof(*hand));
  ------------------
  |  |  102|      2|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  407|      2|    if (hand == NULL)
  ------------------
  |  Branch (407:9): [True: 0, False: 2]
  ------------------
  408|      0|        return 0;
  409|       |
  410|      2|    hand->handfn = handfn;
  411|      2|    hand->arg = arg;
  412|      2|#ifndef FIPS_MODULE
  413|      2|    hand->index = index;
  414|      2|#endif
  415|      2|    hand->next = *hands;
  416|      2|    *hands = hand;
  417|       |
  418|      2|    return 1;
  419|      2|}
initthread.c:init_get_thread_local:
   95|      6|{
   96|      6|    THREAD_EVENT_HANDLER **hands = CRYPTO_THREAD_get_local(local);
   97|       |
   98|      6|    if (alloc) {
  ------------------
  |  Branch (98:9): [True: 2, False: 4]
  ------------------
   99|      2|        if (hands == NULL) {
  ------------------
  |  Branch (99:13): [True: 2, False: 0]
  ------------------
  100|       |
  101|      2|            if ((hands = OPENSSL_zalloc(sizeof(*hands))) == NULL)
  ------------------
  |  |  104|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (101:17): [True: 0, False: 2]
  ------------------
  102|      0|                return NULL;
  103|       |
  104|      2|            if (!CRYPTO_THREAD_set_local(local, hands)) {
  ------------------
  |  Branch (104:17): [True: 0, False: 2]
  ------------------
  105|      0|                OPENSSL_free(hands);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  106|      0|                return NULL;
  107|      0|            }
  108|       |
  109|      2|#ifndef FIPS_MODULE
  110|      2|            if (!init_thread_push_handlers(hands)) {
  ------------------
  |  Branch (110:17): [True: 0, False: 2]
  ------------------
  111|      0|                CRYPTO_THREAD_set_local(local, NULL);
  112|      0|                OPENSSL_free(hands);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  113|      0|                return NULL;
  114|      0|            }
  115|      2|#endif
  116|      2|        }
  117|      4|    } else if (!keep) {
  ------------------
  |  Branch (117:16): [True: 2, False: 2]
  ------------------
  118|      2|        CRYPTO_THREAD_set_local(local, NULL);
  119|      2|    }
  120|       |
  121|      6|    return hands;
  122|      6|}
initthread.c:init_thread_push_handlers:
  155|      2|{
  156|      2|    int ret;
  157|      2|    GLOBAL_TEVENT_REGISTER *gtr;
  158|       |
  159|      2|    gtr = get_global_tevent_register();
  160|      2|    if (gtr == NULL)
  ------------------
  |  Branch (160:9): [True: 0, False: 2]
  ------------------
  161|      0|        return 0;
  162|       |
  163|      2|    if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (163:9): [True: 0, False: 2]
  ------------------
  164|      0|        return 0;
  165|      2|    ret = (sk_THREAD_EVENT_HANDLER_PTR_push(gtr->skhands, hands) != 0);
  166|      2|    CRYPTO_THREAD_unlock(gtr->lock);
  167|       |
  168|      2|    return ret;
  169|      2|}
initthread.c:get_global_tevent_register:
   78|      8|{
   79|      8|    if (!RUN_ONCE(&tevent_register_runonce, create_global_tevent_register))
  ------------------
  |  |  130|      8|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 8, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (79:9): [True: 0, False: 8]
  ------------------
   80|      0|        return NULL;
   81|      8|    return glob_tevent_reg;
   82|      8|}
initthread.c:create_global_tevent_register:
   59|      2|{
   60|      2|    glob_tevent_reg = OPENSSL_zalloc(sizeof(*glob_tevent_reg));
  ------------------
  |  |  104|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|      2|    if (glob_tevent_reg == NULL)
  ------------------
  |  Branch (61:9): [True: 0, False: 2]
  ------------------
   62|      0|        return 0;
   63|       |
   64|      2|    glob_tevent_reg->skhands = sk_THREAD_EVENT_HANDLER_PTR_new_null();
   65|      2|    glob_tevent_reg->lock = CRYPTO_THREAD_lock_new();
   66|      2|    if (glob_tevent_reg->skhands == NULL || glob_tevent_reg->lock == NULL) {
  ------------------
  |  Branch (66:9): [True: 0, False: 2]
  |  Branch (66:45): [True: 0, False: 2]
  ------------------
   67|      0|        sk_THREAD_EVENT_HANDLER_PTR_free(glob_tevent_reg->skhands);
   68|      0|        CRYPTO_THREAD_lock_free(glob_tevent_reg->lock);
   69|      0|        OPENSSL_free(glob_tevent_reg);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   70|      0|        glob_tevent_reg = NULL;
   71|      0|        return 0;
   72|      0|    }
   73|       |
   74|      2|    return 1;
   75|      2|}
initthread.c:init_thread_remove_handlers:
  172|      2|{
  173|      2|    GLOBAL_TEVENT_REGISTER *gtr;
  174|      2|    int i;
  175|       |
  176|      2|    gtr = get_global_tevent_register();
  177|      2|    if (gtr == NULL)
  ------------------
  |  Branch (177:9): [True: 0, False: 2]
  ------------------
  178|      0|        return;
  179|      2|    if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (179:9): [True: 0, False: 2]
  ------------------
  180|      0|        return;
  181|      2|    for (i = 0; i < sk_THREAD_EVENT_HANDLER_PTR_num(gtr->skhands); i++) {
  ------------------
  |  Branch (181:17): [True: 2, False: 0]
  ------------------
  182|      2|        THREAD_EVENT_HANDLER **hands
  183|      2|            = sk_THREAD_EVENT_HANDLER_PTR_value(gtr->skhands, i);
  184|       |
  185|      2|        if (hands == handsin) {
  ------------------
  |  Branch (185:13): [True: 2, False: 0]
  ------------------
  186|      2|            sk_THREAD_EVENT_HANDLER_PTR_delete(gtr->skhands, i);
  187|      2|            CRYPTO_THREAD_unlock(gtr->lock);
  188|      2|            return;
  189|      2|        }
  190|      2|    }
  191|      0|    CRYPTO_THREAD_unlock(gtr->lock);
  192|      0|    return;
  193|      2|}
initthread.c:init_thread_stop:
  323|      4|{
  324|      4|    THREAD_EVENT_HANDLER *curr, *prev = NULL, *tmp;
  325|      4|#ifndef FIPS_MODULE
  326|      4|    GLOBAL_TEVENT_REGISTER *gtr;
  327|      4|#endif
  328|       |
  329|       |    /* Can't do much about this */
  330|      4|    if (hands == NULL)
  ------------------
  |  Branch (330:9): [True: 2, False: 2]
  ------------------
  331|      2|        return;
  332|       |
  333|      2|#ifndef FIPS_MODULE
  334|      2|    gtr = get_global_tevent_register();
  335|      2|    if (gtr == NULL)
  ------------------
  |  Branch (335:9): [True: 0, False: 2]
  ------------------
  336|      0|        return;
  337|       |
  338|      2|    if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (338:9): [True: 0, False: 2]
  ------------------
  339|      0|        return;
  340|      2|#endif
  341|       |
  342|      2|    curr = *hands;
  343|      4|    while (curr != NULL) {
  ------------------
  |  Branch (343:12): [True: 2, False: 2]
  ------------------
  344|      2|        if (arg != NULL && curr->arg != arg) {
  ------------------
  |  Branch (344:13): [True: 0, False: 2]
  |  Branch (344:28): [True: 0, False: 0]
  ------------------
  345|      0|            prev = curr;
  346|      0|            curr = curr->next;
  347|      0|            continue;
  348|      0|        }
  349|      2|        curr->handfn(curr->arg);
  350|      2|        if (prev == NULL)
  ------------------
  |  Branch (350:13): [True: 2, False: 0]
  ------------------
  351|      2|            *hands = curr->next;
  352|      0|        else
  353|      0|            prev->next = curr->next;
  354|       |
  355|      2|        tmp = curr;
  356|      2|        curr = curr->next;
  357|       |
  358|      2|        OPENSSL_free(tmp);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  359|      2|    }
  360|      2|#ifndef FIPS_MODULE
  361|      2|    CRYPTO_THREAD_unlock(gtr->lock);
  362|      2|#endif
  363|      2|}
initthread.c:init_thread_deregister:
  423|      2|{
  424|      2|    GLOBAL_TEVENT_REGISTER *gtr;
  425|      2|    int i;
  426|       |
  427|      2|    gtr = get_global_tevent_register();
  428|      2|    if (gtr == NULL)
  ------------------
  |  Branch (428:9): [True: 0, False: 2]
  ------------------
  429|      0|        return 0;
  430|      2|    if (!all) {
  ------------------
  |  Branch (430:9): [True: 0, False: 2]
  ------------------
  431|      0|        if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (431:13): [True: 0, False: 0]
  ------------------
  432|      0|            return 0;
  433|      2|    } else {
  434|      2|        glob_tevent_reg = NULL;
  435|      2|    }
  436|      2|    for (i = 0; i < sk_THREAD_EVENT_HANDLER_PTR_num(gtr->skhands); i++) {
  ------------------
  |  Branch (436:17): [True: 0, False: 2]
  ------------------
  437|      0|        THREAD_EVENT_HANDLER **hands
  438|      0|            = sk_THREAD_EVENT_HANDLER_PTR_value(gtr->skhands, i);
  439|      0|        THREAD_EVENT_HANDLER *curr = NULL, *prev = NULL, *tmp;
  440|       |
  441|      0|        if (hands == NULL) {
  ------------------
  |  Branch (441:13): [True: 0, False: 0]
  ------------------
  442|      0|            if (!all)
  ------------------
  |  Branch (442:17): [True: 0, False: 0]
  ------------------
  443|      0|                CRYPTO_THREAD_unlock(gtr->lock);
  444|      0|            return 0;
  445|      0|        }
  446|      0|        curr = *hands;
  447|      0|        while (curr != NULL) {
  ------------------
  |  Branch (447:16): [True: 0, False: 0]
  ------------------
  448|      0|            if (all || curr->index == index) {
  ------------------
  |  Branch (448:17): [True: 0, False: 0]
  |  Branch (448:24): [True: 0, False: 0]
  ------------------
  449|      0|                if (prev != NULL)
  ------------------
  |  Branch (449:21): [True: 0, False: 0]
  ------------------
  450|      0|                    prev->next = curr->next;
  451|      0|                else
  452|      0|                    *hands = curr->next;
  453|      0|                tmp = curr;
  454|      0|                curr = curr->next;
  455|      0|                OPENSSL_free(tmp);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  456|      0|                continue;
  457|      0|            }
  458|      0|            prev = curr;
  459|      0|            curr = curr->next;
  460|      0|        }
  461|      0|        if (all)
  ------------------
  |  Branch (461:13): [True: 0, False: 0]
  ------------------
  462|      0|            OPENSSL_free(hands);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  463|      0|    }
  464|      2|    if (all) {
  ------------------
  |  Branch (464:9): [True: 2, False: 0]
  ------------------
  465|      2|        CRYPTO_THREAD_lock_free(gtr->lock);
  466|      2|        sk_THREAD_EVENT_HANDLER_PTR_free(gtr->skhands);
  467|      2|        OPENSSL_free(gtr);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  468|      2|    } else {
  469|      0|        CRYPTO_THREAD_unlock(gtr->lock);
  470|      0|    }
  471|      2|    return 1;
  472|      2|}

OPENSSL_LH_set_thunks:
   52|     24|{
   53|       |
   54|     24|    if (lh == NULL)
  ------------------
  |  Branch (54:9): [True: 0, False: 24]
  ------------------
   55|      0|        return NULL;
   56|     24|    lh->compw = cw;
   57|     24|    lh->hashw = hw;
   58|     24|    lh->daw = daw;
   59|     24|    lh->daaw = daaw;
   60|     24|    return lh;
   61|     24|}
OPENSSL_LH_new:
   64|     24|{
   65|     24|    OPENSSL_LHASH *ret;
   66|       |
   67|     24|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  104|     24|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     24|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     24|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (67:9): [True: 0, False: 24]
  ------------------
   68|      0|        return NULL;
   69|     24|    if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)
  ------------------
  |  |  104|     24|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     24|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     24|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (69:9): [True: 0, False: 24]
  ------------------
   70|      0|        goto err;
   71|     24|    ret->comp = ((c == NULL) ? (OPENSSL_LH_COMPFUNC)strcmp : c);
  ------------------
  |  Branch (71:18): [True: 0, False: 24]
  ------------------
   72|     24|    ret->hash = ((h == NULL) ? (OPENSSL_LH_HASHFUNC)OPENSSL_LH_strhash : h);
  ------------------
  |  Branch (72:18): [True: 0, False: 24]
  ------------------
   73|     24|    ret->num_nodes = MIN_NODES / 2;
  ------------------
  |  |   39|     24|#define MIN_NODES       16
  ------------------
   74|     24|    ret->num_alloc_nodes = MIN_NODES;
  ------------------
  |  |   39|     24|#define MIN_NODES       16
  ------------------
   75|     24|    ret->pmax = MIN_NODES / 2;
  ------------------
  |  |   39|     24|#define MIN_NODES       16
  ------------------
   76|     24|    ret->up_load = UP_LOAD;
  ------------------
  |  |   40|     24|#define UP_LOAD         (2*LH_LOAD_MULT) /* load times 256 (default 2) */
  |  |  ------------------
  |  |  |  |   85|     24|# define LH_LOAD_MULT    256
  |  |  ------------------
  ------------------
   77|     24|    ret->down_load = DOWN_LOAD;
  ------------------
  |  |   41|     24|#define DOWN_LOAD       (LH_LOAD_MULT) /* load times 256 (default 1) */
  |  |  ------------------
  |  |  |  |   85|     24|# define LH_LOAD_MULT    256
  |  |  ------------------
  ------------------
   78|     24|    return ret;
   79|       |
   80|      0|err:
   81|      0|    OPENSSL_free(ret->b);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   82|      0|    OPENSSL_free(ret);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   83|      0|    return NULL;
   84|     24|}
OPENSSL_LH_free:
   87|     16|{
   88|     16|    if (lh == NULL)
  ------------------
  |  Branch (88:9): [True: 2, False: 14]
  ------------------
   89|      2|        return;
   90|       |
   91|     14|    OPENSSL_LH_flush(lh);
   92|     14|    OPENSSL_free(lh->b);
  ------------------
  |  |  115|     14|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     14|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     14|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|     14|    OPENSSL_free(lh);
  ------------------
  |  |  115|     14|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     14|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     14|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|     14|}
OPENSSL_LH_flush:
   97|     16|{
   98|     16|    unsigned int i;
   99|     16|    OPENSSL_LH_NODE *n, *nn;
  100|       |
  101|     16|    if (lh == NULL)
  ------------------
  |  Branch (101:9): [True: 0, False: 16]
  ------------------
  102|      0|        return;
  103|       |
  104|  2.18k|    for (i = 0; i < lh->num_nodes; i++) {
  ------------------
  |  Branch (104:17): [True: 2.17k, False: 16]
  ------------------
  105|  2.17k|        n = lh->b[i];
  106|  5.85k|        while (n != NULL) {
  ------------------
  |  Branch (106:16): [True: 3.68k, False: 2.17k]
  ------------------
  107|  3.68k|            nn = n->next;
  108|  3.68k|            OPENSSL_free(n);
  ------------------
  |  |  115|  3.68k|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|  3.68k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|  3.68k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  109|  3.68k|            n = nn;
  110|  3.68k|        }
  111|  2.17k|        lh->b[i] = NULL;
  112|  2.17k|    }
  113|       |
  114|     16|    lh->num_items = 0;
  115|     16|}
OPENSSL_LH_insert:
  118|  10.2k|{
  119|  10.2k|    unsigned long hash;
  120|  10.2k|    OPENSSL_LH_NODE *nn, **rn;
  121|  10.2k|    void *ret;
  122|       |
  123|  10.2k|    lh->error = 0;
  124|  10.2k|    if ((lh->up_load <= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)) && !expand(lh))
  ------------------
  |  |   85|  10.2k|# define LH_LOAD_MULT    256
  ------------------
  |  Branch (124:9): [True: 2.04k, False: 8.24k]
  |  Branch (124:76): [True: 0, False: 2.04k]
  ------------------
  125|      0|        return NULL;        /* 'lh->error++' already done in 'expand' */
  126|       |
  127|  10.2k|    rn = getrn(lh, data, &hash);
  128|       |
  129|  10.2k|    if (*rn == NULL) {
  ------------------
  |  Branch (129:9): [True: 4.18k, False: 6.10k]
  ------------------
  130|  4.18k|        if ((nn = OPENSSL_malloc(sizeof(*nn))) == NULL) {
  ------------------
  |  |  102|  4.18k|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|  4.18k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|  4.18k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (130:13): [True: 0, False: 4.18k]
  ------------------
  131|      0|            lh->error++;
  132|      0|            return NULL;
  133|      0|        }
  134|  4.18k|        nn->data = data;
  135|  4.18k|        nn->next = NULL;
  136|  4.18k|        nn->hash = hash;
  137|  4.18k|        *rn = nn;
  138|  4.18k|        ret = NULL;
  139|  4.18k|        lh->num_items++;
  140|  6.10k|    } else {                    /* replace same key */
  141|  6.10k|        ret = (*rn)->data;
  142|  6.10k|        (*rn)->data = data;
  143|  6.10k|    }
  144|  10.2k|    return ret;
  145|  10.2k|}
OPENSSL_LH_delete:
  148|    484|{
  149|    484|    unsigned long hash;
  150|    484|    OPENSSL_LH_NODE *nn, **rn;
  151|    484|    void *ret;
  152|       |
  153|    484|    lh->error = 0;
  154|    484|    rn = getrn(lh, data, &hash);
  155|       |
  156|    484|    if (*rn == NULL) {
  ------------------
  |  Branch (156:9): [True: 0, False: 484]
  ------------------
  157|      0|        return NULL;
  158|    484|    } else {
  159|    484|        nn = *rn;
  160|    484|        *rn = nn->next;
  161|    484|        ret = nn->data;
  162|    484|        OPENSSL_free(nn);
  ------------------
  |  |  115|    484|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|    484|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|    484|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  163|    484|    }
  164|       |
  165|    484|    lh->num_items--;
  166|    484|    if ((lh->num_nodes > MIN_NODES) &&
  ------------------
  |  |   39|    484|#define MIN_NODES       16
  ------------------
  |  Branch (166:9): [True: 484, False: 0]
  ------------------
  167|    484|        (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))
  ------------------
  |  |   85|    484|# define LH_LOAD_MULT    256
  ------------------
  |  Branch (167:9): [True: 2, False: 482]
  ------------------
  168|      2|        contract(lh);
  169|       |
  170|    484|    return ret;
  171|    484|}
OPENSSL_LH_retrieve:
  174|    204|{
  175|    204|    unsigned long hash;
  176|    204|    OPENSSL_LH_NODE **rn;
  177|       |
  178|    204|    if (lh->error != 0)
  ------------------
  |  Branch (178:9): [True: 0, False: 204]
  ------------------
  179|      0|        lh->error = 0;
  180|       |
  181|    204|    rn = getrn(lh, data, &hash);
  182|       |
  183|    204|    return *rn == NULL ? NULL : (*rn)->data;
  ------------------
  |  Branch (183:12): [True: 204, False: 0]
  ------------------
  184|    204|}
OPENSSL_LH_doall:
  217|     20|{
  218|     20|    if (lh == NULL)
  ------------------
  |  Branch (218:9): [True: 0, False: 20]
  ------------------
  219|      0|        return;
  220|       |
  221|     20|    doall_util_fn(lh, 0, lh->daw, func, (OPENSSL_LH_DOALL_FUNCARG)NULL,
  222|     20|                  (OPENSSL_LH_DOALL_FUNCARG_THUNK)NULL, NULL);
  223|     20|}
OPENSSL_LH_strhash:
  362|     96|{
  363|     96|    unsigned long ret = 0;
  364|     96|    long n;
  365|     96|    unsigned long v;
  366|     96|    int r;
  367|       |
  368|     96|    if ((c == NULL) || (*c == '\0'))
  ------------------
  |  Branch (368:9): [True: 0, False: 96]
  |  Branch (368:24): [True: 0, False: 96]
  ------------------
  369|      0|        return ret;
  370|       |
  371|     96|    n = 0x100;
  372|    624|    while (*c) {
  ------------------
  |  Branch (372:12): [True: 528, False: 96]
  ------------------
  373|    528|        v = n | (*c);
  374|    528|        n += 0x100;
  375|    528|        r = (int)((v >> 2) ^ v) & 0x0f;
  376|       |        /* cast to uint64_t to avoid 32 bit shift of 32 bit value */
  377|    528|        ret = (ret << r) | (unsigned long)((uint64_t)ret >> (32 - r));
  378|    528|        ret &= 0xFFFFFFFFL;
  379|    528|        ret ^= v * v;
  380|    528|        c++;
  381|    528|    }
  382|     96|    return (ret >> 16) ^ ret;
  383|     96|}
ossl_lh_strcasehash:
  400|  1.33k|{
  401|  1.33k|    unsigned long ret = 0;
  402|  1.33k|    long n;
  403|  1.33k|    unsigned long v;
  404|  1.33k|    int r;
  405|       |#if defined(CHARSET_EBCDIC) && !defined(CHARSET_EBCDIC_TEST)
  406|       |    const long int case_adjust = ~0x40;
  407|       |#else
  408|  1.33k|    const long int case_adjust = ~0x20;
  409|  1.33k|#endif
  410|       |
  411|  1.33k|    if (c == NULL || *c == '\0')
  ------------------
  |  Branch (411:9): [True: 0, False: 1.33k]
  |  Branch (411:22): [True: 0, False: 1.33k]
  ------------------
  412|      0|        return ret;
  413|       |
  414|  16.1k|    for (n = 0x100; *c != '\0'; n += 0x100) {
  ------------------
  |  Branch (414:21): [True: 14.8k, False: 1.33k]
  ------------------
  415|  14.8k|        v = n | (case_adjust & *c);
  416|  14.8k|        r = (int)((v >> 2) ^ v) & 0x0f;
  417|       |        /* cast to uint64_t to avoid 32 bit shift of 32 bit value */
  418|  14.8k|        ret = (ret << r) | (unsigned long)((uint64_t)ret >> (32 - r));
  419|  14.8k|        ret &= 0xFFFFFFFFL;
  420|  14.8k|        ret ^= v * v;
  421|  14.8k|        c++;
  422|  14.8k|    }
  423|  1.33k|    return (ret >> 16) ^ ret;
  424|  1.33k|}
OPENSSL_LH_get_down_load:
  432|      8|{
  433|      8|    return lh->down_load;
  434|      8|}
OPENSSL_LH_set_down_load:
  437|     14|{
  438|     14|    lh->down_load = down_load;
  439|     14|}
OPENSSL_LH_error:
  442|    516|{
  443|    516|    return lh->error;
  444|    516|}
lhash.c:doall_util_fn:
  192|     20|{
  193|     20|    int i;
  194|     20|    OPENSSL_LH_NODE *a, *n;
  195|       |
  196|     20|    if (lh == NULL)
  ------------------
  |  Branch (196:9): [True: 0, False: 20]
  ------------------
  197|      0|        return;
  198|       |
  199|       |    /*
  200|       |     * reverse the order so we search from 'top to bottom' We were having
  201|       |     * memory leaks otherwise
  202|       |     */
  203|  1.09k|    for (i = lh->num_nodes - 1; i >= 0; i--) {
  ------------------
  |  Branch (203:33): [True: 1.07k, False: 20]
  ------------------
  204|  1.07k|        a = lh->b[i];
  205|  2.17k|        while (a != NULL) {
  ------------------
  |  Branch (205:16): [True: 1.10k, False: 1.07k]
  ------------------
  206|  1.10k|            n = a->next;
  207|  1.10k|            if (use_arg)
  ------------------
  |  Branch (207:17): [True: 0, False: 1.10k]
  ------------------
  208|      0|                wfunc_arg(a->data, arg, func_arg);
  209|  1.10k|            else
  210|  1.10k|                wfunc(a->data, func);
  211|  1.10k|            a = n;
  212|  1.10k|        }
  213|  1.07k|    }
  214|     20|}
lhash.c:expand:
  244|  2.04k|{
  245|  2.04k|    OPENSSL_LH_NODE **n, **n1, **n2, *np;
  246|  2.04k|    unsigned int p, pmax, nni, j;
  247|  2.04k|    unsigned long hash;
  248|       |
  249|  2.04k|    nni = lh->num_alloc_nodes;
  250|  2.04k|    p = lh->p;
  251|  2.04k|    pmax = lh->pmax;
  252|  2.04k|    if (p + 1 >= pmax) {
  ------------------
  |  Branch (252:9): [True: 18, False: 2.02k]
  ------------------
  253|     18|        j = nni * 2;
  254|     18|        n = OPENSSL_realloc(lh->b, sizeof(OPENSSL_LH_NODE *) * j);
  ------------------
  |  |  109|     18|        CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     18|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     18|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  255|     18|        if (n == NULL) {
  ------------------
  |  Branch (255:13): [True: 0, False: 18]
  ------------------
  256|      0|            lh->error++;
  257|      0|            return 0;
  258|      0|        }
  259|     18|        lh->b = n;
  260|     18|        memset(n + nni, 0, sizeof(*n) * (j - nni));
  261|     18|        lh->pmax = nni;
  262|     18|        lh->num_alloc_nodes = j;
  263|     18|        lh->p = 0;
  264|  2.02k|    } else {
  265|  2.02k|        lh->p++;
  266|  2.02k|    }
  267|       |
  268|  2.04k|    lh->num_nodes++;
  269|  2.04k|    n1 = &(lh->b[p]);
  270|  2.04k|    n2 = &(lh->b[p + pmax]);
  271|  2.04k|    *n2 = NULL;
  272|       |
  273|  8.44k|    for (np = *n1; np != NULL;) {
  ------------------
  |  Branch (273:20): [True: 6.39k, False: 2.04k]
  ------------------
  274|  6.39k|        hash = np->hash;
  275|  6.39k|        if ((hash % nni) != p) { /* move it */
  ------------------
  |  Branch (275:13): [True: 1.10k, False: 5.28k]
  ------------------
  276|  1.10k|            *n1 = (*n1)->next;
  277|  1.10k|            np->next = *n2;
  278|  1.10k|            *n2 = np;
  279|  1.10k|        } else
  280|  5.28k|            n1 = &((*n1)->next);
  281|  6.39k|        np = *n1;
  282|  6.39k|    }
  283|       |
  284|  2.04k|    return 1;
  285|  2.04k|}
lhash.c:contract:
  288|      2|{
  289|      2|    OPENSSL_LH_NODE **n, *n1, *np;
  290|       |
  291|      2|    np = lh->b[lh->p + lh->pmax - 1];
  292|      2|    lh->b[lh->p + lh->pmax - 1] = NULL; /* 24/07-92 - eay - weird but :-( */
  293|      2|    if (lh->p == 0) {
  ------------------
  |  Branch (293:9): [True: 0, False: 2]
  ------------------
  294|      0|        n = OPENSSL_realloc(lh->b,
  ------------------
  |  |  109|      0|        CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  295|      0|                            (unsigned int)(sizeof(OPENSSL_LH_NODE *) * lh->pmax));
  296|      0|        if (n == NULL) {
  ------------------
  |  Branch (296:13): [True: 0, False: 0]
  ------------------
  297|       |            /* fputs("realloc error in lhash", stderr); */
  298|      0|            lh->error++;
  299|      0|        } else {
  300|      0|            lh->b = n;
  301|      0|        }
  302|      0|        lh->num_alloc_nodes /= 2;
  303|      0|        lh->pmax /= 2;
  304|      0|        lh->p = lh->pmax - 1;
  305|      0|    } else
  306|      2|        lh->p--;
  307|       |
  308|      2|    lh->num_nodes--;
  309|       |
  310|      2|    n1 = lh->b[(int)lh->p];
  311|      2|    if (n1 == NULL)
  ------------------
  |  Branch (311:9): [True: 2, False: 0]
  ------------------
  312|      2|        lh->b[(int)lh->p] = np;
  313|      0|    else {
  314|      0|        while (n1->next != NULL)
  ------------------
  |  Branch (314:16): [True: 0, False: 0]
  ------------------
  315|      0|            n1 = n1->next;
  316|      0|        n1->next = np;
  317|      0|    }
  318|      2|}
lhash.c:getrn:
  322|  10.9k|{
  323|  10.9k|    OPENSSL_LH_NODE **ret, *n1;
  324|  10.9k|    unsigned long hash, nn;
  325|       |
  326|  10.9k|    if (lh->hashw != NULL)
  ------------------
  |  Branch (326:9): [True: 10.9k, False: 0]
  ------------------
  327|  10.9k|        hash = lh->hashw(data, lh->hash);
  328|      0|    else
  329|      0|        hash = lh->hash(data);
  330|       |
  331|  10.9k|    *rhash = hash;
  332|       |
  333|  10.9k|    nn = hash % lh->pmax;
  334|  10.9k|    if (nn < lh->p)
  ------------------
  |  Branch (334:9): [True: 5.18k, False: 5.79k]
  ------------------
  335|  5.18k|        nn = hash % lh->num_alloc_nodes;
  336|       |
  337|  10.9k|    ret = &(lh->b[(int)nn]);
  338|  28.2k|    for (n1 = *ret; n1 != NULL; n1 = n1->next) {
  ------------------
  |  Branch (338:21): [True: 23.8k, False: 4.38k]
  ------------------
  339|  23.8k|        if (n1->hash != hash) {
  ------------------
  |  Branch (339:13): [True: 16.8k, False: 6.99k]
  ------------------
  340|  16.8k|            ret = &(n1->next);
  341|  16.8k|            continue;
  342|  16.8k|        }
  343|       |
  344|  6.99k|        if (lh->compw != NULL) {
  ------------------
  |  Branch (344:13): [True: 6.99k, False: 0]
  ------------------
  345|  6.99k|            if (lh->compw(n1->data, data, lh->comp) == 0)
  ------------------
  |  Branch (345:17): [True: 6.59k, False: 408]
  ------------------
  346|  6.59k|                break;
  347|  6.99k|        } else {
  348|      0|            if (lh->comp(n1->data, data) == 0)
  ------------------
  |  Branch (348:17): [True: 0, False: 0]
  ------------------
  349|      0|                break;
  350|      0|        }
  351|    408|        ret = &(n1->next);
  352|    408|    }
  353|  10.9k|    return ret;
  354|  10.9k|}

CRYPTO_malloc:
  178|  3.71M|{
  179|  3.71M|    void *ptr;
  180|       |
  181|  3.71M|    INCREMENT(malloc_count);
  182|  3.71M|    if (malloc_impl != CRYPTO_malloc) {
  ------------------
  |  Branch (182:9): [True: 0, False: 3.71M]
  ------------------
  183|      0|        ptr = malloc_impl(num, file, line);
  184|      0|        if (ptr != NULL || num == 0)
  ------------------
  |  Branch (184:13): [True: 0, False: 0]
  |  Branch (184:28): [True: 0, False: 0]
  ------------------
  185|      0|            return ptr;
  186|      0|        goto err;
  187|      0|    }
  188|       |
  189|  3.71M|    if (num == 0)
  ------------------
  |  Branch (189:9): [True: 0, False: 3.71M]
  ------------------
  190|      0|        return NULL;
  191|       |
  192|  3.71M|    FAILTEST();
  193|  3.71M|    if (allow_customize) {
  ------------------
  |  Branch (193:9): [True: 2, False: 3.71M]
  ------------------
  194|       |        /*
  195|       |         * Disallow customization after the first allocation. We only set this
  196|       |         * if necessary to avoid a store to the same cache line on every
  197|       |         * allocation.
  198|       |         */
  199|      2|        allow_customize = 0;
  200|      2|    }
  201|       |
  202|  3.71M|    ptr = malloc(num);
  203|  3.71M|    if (ptr != NULL)
  ------------------
  |  Branch (203:9): [True: 3.71M, False: 0]
  ------------------
  204|  3.71M|        return ptr;
  205|      0| err:
  206|       |    /*
  207|       |     * ossl_err_get_state_int() in err.c uses CRYPTO_zalloc(num, NULL, 0) for
  208|       |     * ERR_STATE allocation. Prevent mem alloc error loop while reporting error.
  209|       |     */
  210|      0|    if (file != NULL || line != 0) {
  ------------------
  |  Branch (210:9): [True: 0, False: 0]
  |  Branch (210:25): [True: 0, False: 0]
  ------------------
  211|      0|        ERR_new();
  212|      0|        ERR_set_debug(file, line, NULL);
  213|      0|        ERR_set_error(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE, NULL);
  ------------------
  |  |   85|      0|# define ERR_LIB_CRYPTO          15
  ------------------
                      ERR_set_error(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE, NULL);
  ------------------
  |  |  351|      0|# define ERR_R_MALLOC_FAILURE                    (256|ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  350|      0|# define ERR_R_FATAL                             (ERR_RFLAG_FATAL|ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  236|      0|# define ERR_RFLAG_FATAL                (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  228|      0|# define ERR_RFLAGS_OFFSET              18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               # define ERR_R_FATAL                             (ERR_RFLAG_FATAL|ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|# define ERR_RFLAG_COMMON               (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  228|      0|# define ERR_RFLAGS_OFFSET              18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|      0|    }
  215|      0|    return NULL;
  216|  3.71M|}
CRYPTO_zalloc:
  219|  2.00M|{
  220|  2.00M|    void *ret;
  221|       |
  222|  2.00M|    ret = CRYPTO_malloc(num, file, line);
  223|  2.00M|    if (ret != NULL)
  ------------------
  |  Branch (223:9): [True: 2.00M, False: 0]
  ------------------
  224|  2.00M|        memset(ret, 0, num);
  225|       |
  226|  2.00M|    return ret;
  227|  2.00M|}
CRYPTO_realloc:
  289|  13.2k|{
  290|  13.2k|    INCREMENT(realloc_count);
  291|  13.2k|    if (realloc_impl != CRYPTO_realloc)
  ------------------
  |  Branch (291:9): [True: 0, False: 13.2k]
  ------------------
  292|      0|        return realloc_impl(str, num, file, line);
  293|       |
  294|  13.2k|    if (str == NULL)
  ------------------
  |  Branch (294:9): [True: 2, False: 13.2k]
  ------------------
  295|      2|        return CRYPTO_malloc(num, file, line);
  296|       |
  297|  13.2k|    if (num == 0) {
  ------------------
  |  Branch (297:9): [True: 0, False: 13.2k]
  ------------------
  298|      0|        CRYPTO_free(str, file, line);
  299|      0|        return NULL;
  300|      0|    }
  301|       |
  302|  13.2k|    FAILTEST();
  303|  13.2k|    return realloc(str, num);
  304|  13.2k|}
CRYPTO_free:
  334|  4.28M|{
  335|  4.28M|    INCREMENT(free_count);
  336|  4.28M|    if (free_impl != CRYPTO_free) {
  ------------------
  |  Branch (336:9): [True: 0, False: 4.28M]
  ------------------
  337|      0|        free_impl(str, file, line);
  338|      0|        return;
  339|      0|    }
  340|       |
  341|  4.28M|    free(str);
  342|  4.28M|}

CRYPTO_secure_malloc_done:
  132|      2|{
  133|      2|#ifndef OPENSSL_NO_SECURE_MEMORY
  134|      2|    if (secure_mem_used == 0) {
  ------------------
  |  Branch (134:9): [True: 2, False: 0]
  ------------------
  135|      2|        sh_done();
  136|      2|        secure_mem_initialized = 0;
  137|      2|        CRYPTO_THREAD_lock_free(sec_malloc_lock);
  138|      2|        sec_malloc_lock = NULL;
  139|      2|        return 1;
  140|      2|    }
  141|      0|#endif /* OPENSSL_NO_SECURE_MEMORY */
  142|      0|    return 0;
  143|      2|}
mem_sec.c:sh_done:
  599|      2|{
  600|      2|    OPENSSL_free(sh.freelist);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  601|      2|    OPENSSL_free(sh.bittable);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  602|      2|    OPENSSL_free(sh.bitmalloc);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  603|      2|#if !defined(_WIN32)
  604|      2|    if (sh.map_result != MAP_FAILED && sh.map_size)
  ------------------
  |  Branch (604:9): [True: 2, False: 0]
  |  Branch (604:40): [True: 0, False: 2]
  ------------------
  605|      0|        munmap(sh.map_result, sh.map_size);
  606|       |#else
  607|       |    if (sh.map_result != NULL && sh.map_size)
  608|       |        VirtualFree(sh.map_result, 0, MEM_RELEASE);
  609|       |#endif
  610|      2|    memset(&sh, 0, sizeof(sh));
  611|      2|}

openssl_fopen:
   39|      2|{
   40|      2|    FILE *file = NULL;
   41|       |# if defined(_WIN32) && defined(CP_UTF8)
   42|       |    int sz, len_0;
   43|       |    DWORD flags;
   44|       |# endif
   45|       |
   46|      2|    if (filename == NULL)
  ------------------
  |  Branch (46:9): [True: 0, False: 2]
  ------------------
   47|      0|        return NULL;
   48|       |# if defined(_WIN32) && defined(CP_UTF8)
   49|       |    len_0 = (int)strlen(filename) + 1;
   50|       |
   51|       |    /*
   52|       |     * Basically there are three cases to cover: a) filename is
   53|       |     * pure ASCII string; b) actual UTF-8 encoded string and
   54|       |     * c) locale-ized string, i.e. one containing 8-bit
   55|       |     * characters that are meaningful in current system locale.
   56|       |     * If filename is pure ASCII or real UTF-8 encoded string,
   57|       |     * MultiByteToWideChar succeeds and _wfopen works. If
   58|       |     * filename is locale-ized string, chances are that
   59|       |     * MultiByteToWideChar fails reporting
   60|       |     * ERROR_NO_UNICODE_TRANSLATION, in which case we fall
   61|       |     * back to fopen...
   62|       |     */
   63|       |    if ((sz = MultiByteToWideChar(CP_UTF8, (flags = MB_ERR_INVALID_CHARS),
   64|       |                                  filename, len_0, NULL, 0)) > 0 ||
   65|       |        (GetLastError() == ERROR_INVALID_FLAGS &&
   66|       |         (sz = MultiByteToWideChar(CP_UTF8, (flags = 0),
   67|       |                                   filename, len_0, NULL, 0)) > 0)
   68|       |        ) {
   69|       |        WCHAR wmode[8];
   70|       |        WCHAR *wfilename = _alloca(sz * sizeof(WCHAR));
   71|       |
   72|       |        if (MultiByteToWideChar(CP_UTF8, flags,
   73|       |                                filename, len_0, wfilename, sz) &&
   74|       |            MultiByteToWideChar(CP_UTF8, 0, mode, strlen(mode) + 1,
   75|       |                                wmode, OSSL_NELEM(wmode)) &&
   76|       |            (file = _wfopen(wfilename, wmode)) == NULL &&
   77|       |            (errno == ENOENT || errno == EBADF)
   78|       |            ) {
   79|       |            /*
   80|       |             * UTF-8 decode succeeded, but no file, filename
   81|       |             * could still have been locale-ized...
   82|       |             */
   83|       |            file = fopen(filename, mode);
   84|       |        }
   85|       |    } else if (GetLastError() == ERROR_NO_UNICODE_TRANSLATION) {
   86|       |        file = fopen(filename, mode);
   87|       |    }
   88|       |# elif defined(__DJGPP__)
   89|       |    {
   90|       |        char *newname = NULL;
   91|       |
   92|       |        if (pathconf(filename, _PC_NAME_MAX) <= 12) {  /* 8.3 file system? */
   93|       |            char *iterator;
   94|       |            char lastchar;
   95|       |
   96|       |            if ((newname = OPENSSL_malloc(strlen(filename) + 1)) == NULL)
   97|       |                return NULL;
   98|       |
   99|       |            for (iterator = newname, lastchar = '\0';
  100|       |                *filename; filename++, iterator++) {
  101|       |                if (lastchar == '/' && filename[0] == '.'
  102|       |                    && filename[1] != '.' && filename[1] != '/') {
  103|       |                    /* Leading dots are not permitted in plain DOS. */
  104|       |                    *iterator = '_';
  105|       |                } else {
  106|       |                    *iterator = *filename;
  107|       |                }
  108|       |                lastchar = *filename;
  109|       |            }
  110|       |            *iterator = '\0';
  111|       |            filename = newname;
  112|       |        }
  113|       |        file = fopen(filename, mode);
  114|       |
  115|       |        OPENSSL_free(newname);
  116|       |    }
  117|       |# else
  118|      2|    file = fopen(filename, mode);
  119|      2|# endif
  120|      2|    return file;
  121|      2|}

CRYPTO_strdup:
   22|      6|{
   23|      6|    char *ret;
   24|       |
   25|      6|    if (str == NULL)
  ------------------
  |  Branch (25:9): [True: 0, False: 6]
  ------------------
   26|      0|        return NULL;
   27|      6|    ret = CRYPTO_malloc(strlen(str) + 1, file, line);
   28|      6|    if (ret != NULL)
  ------------------
  |  Branch (28:9): [True: 6, False: 0]
  ------------------
   29|      6|        strcpy(ret, str);
   30|      6|    return ret;
   31|      6|}
OPENSSL_strnlen:
   65|     10|{
   66|     10|    const char *p;
   67|       |
   68|    118|    for (p = str; maxlen-- != 0 && *p != CH_ZERO; ++p) ;
  ------------------
  |  |   19|    118|#define CH_ZERO '\0'
  ------------------
  |  Branch (68:19): [True: 118, False: 0]
  |  Branch (68:36): [True: 108, False: 10]
  ------------------
   69|       |
   70|     10|    return p - str;
   71|     10|}
OPENSSL_strcasecmp:
  410|    848|{
  411|    848|    int t;
  412|       |
  413|  10.1k|    while ((t = ossl_tolower(*s1) - ossl_tolower(*s2++)) == 0)
  ------------------
  |  Branch (413:12): [True: 10.1k, False: 0]
  ------------------
  414|  10.1k|        if (*s1++ == '\0')
  ------------------
  |  Branch (414:13): [True: 848, False: 9.33k]
  ------------------
  415|    848|            return 0;
  416|      0|    return t;
  417|    848|}

OBJ_NAME_init:
   64|  1.33k|{
   65|  1.33k|    return RUN_ONCE(&init, o_names_init);
  ------------------
  |  |  130|  1.33k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1.33k, False: 0]
  |  |  ------------------
  ------------------
   66|  1.33k|}
OBJ_NAME_add:
  189|    848|{
  190|    848|    OBJ_NAME *onp, *ret;
  191|    848|    int alias, ok = 0;
  192|       |
  193|    848|    if (!OBJ_NAME_init())
  ------------------
  |  Branch (193:9): [True: 0, False: 848]
  ------------------
  194|      0|        return 0;
  195|       |
  196|    848|    alias = type & OBJ_NAME_ALIAS;
  ------------------
  |  |   33|    848|# define OBJ_NAME_ALIAS                  0x8000
  ------------------
  197|    848|    type &= ~OBJ_NAME_ALIAS;
  ------------------
  |  |   33|    848|# define OBJ_NAME_ALIAS                  0x8000
  ------------------
  198|       |
  199|    848|    onp = OPENSSL_malloc(sizeof(*onp));
  ------------------
  |  |  102|    848|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|    848|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|    848|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  200|    848|    if (onp == NULL)
  ------------------
  |  Branch (200:9): [True: 0, False: 848]
  ------------------
  201|      0|        return 0;
  202|       |
  203|    848|    onp->name = name;
  204|    848|    onp->alias = alias;
  205|    848|    onp->type = type;
  206|    848|    onp->data = data;
  207|       |
  208|    848|    if (!CRYPTO_THREAD_write_lock(obj_lock)) {
  ------------------
  |  Branch (208:9): [True: 0, False: 848]
  ------------------
  209|      0|        OPENSSL_free(onp);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  210|      0|        return 0;
  211|      0|    }
  212|       |
  213|    848|    ret = lh_OBJ_NAME_insert(names_lh, onp);
  214|    848|    if (ret != NULL) {
  ------------------
  |  Branch (214:9): [True: 364, False: 484]
  ------------------
  215|       |        /* free things */
  216|    364|        if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (216:13): [True: 0, False: 364]
  ------------------
  217|    364|            && (sk_NAME_FUNCS_num(name_funcs_stack) > ret->type)) {
  ------------------
  |  Branch (217:16): [True: 0, False: 0]
  ------------------
  218|       |            /*
  219|       |             * XXX: I'm not sure I understand why the free function should
  220|       |             * get three arguments... -- Richard Levitte
  221|       |             */
  222|      0|            sk_NAME_FUNCS_value(name_funcs_stack,
  223|      0|                                ret->type)->free_func(ret->name, ret->type,
  224|      0|                                                      ret->data);
  225|      0|        }
  226|    364|        OPENSSL_free(ret);
  ------------------
  |  |  115|    364|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|    364|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|    364|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  227|    484|    } else {
  228|    484|        if (lh_OBJ_NAME_error(names_lh)) {
  ------------------
  |  Branch (228:13): [True: 0, False: 484]
  ------------------
  229|       |            /* ERROR */
  230|      0|            OPENSSL_free(onp);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  231|      0|            goto unlock;
  232|      0|        }
  233|    484|    }
  234|       |
  235|    848|    ok = 1;
  236|       |
  237|    848|unlock:
  238|    848|    CRYPTO_THREAD_unlock(obj_lock);
  239|    848|    return ok;
  240|    848|}
OBJ_NAME_remove:
  243|    484|{
  244|    484|    OBJ_NAME on, *ret;
  245|    484|    int ok = 0;
  246|       |
  247|    484|    if (!OBJ_NAME_init())
  ------------------
  |  Branch (247:9): [True: 0, False: 484]
  ------------------
  248|      0|        return 0;
  249|       |
  250|    484|    if (!CRYPTO_THREAD_write_lock(obj_lock))
  ------------------
  |  Branch (250:9): [True: 0, False: 484]
  ------------------
  251|      0|        return 0;
  252|       |
  253|    484|    type &= ~OBJ_NAME_ALIAS;
  ------------------
  |  |   33|    484|# define OBJ_NAME_ALIAS                  0x8000
  ------------------
  254|    484|    on.name = name;
  255|    484|    on.type = type;
  256|    484|    ret = lh_OBJ_NAME_delete(names_lh, &on);
  257|    484|    if (ret != NULL) {
  ------------------
  |  Branch (257:9): [True: 484, False: 0]
  ------------------
  258|       |        /* free things */
  259|    484|        if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (259:13): [True: 0, False: 484]
  ------------------
  260|    484|            && (sk_NAME_FUNCS_num(name_funcs_stack) > ret->type)) {
  ------------------
  |  Branch (260:16): [True: 0, False: 0]
  ------------------
  261|       |            /*
  262|       |             * XXX: I'm not sure I understand why the free function should
  263|       |             * get three arguments... -- Richard Levitte
  264|       |             */
  265|      0|            sk_NAME_FUNCS_value(name_funcs_stack,
  266|      0|                                ret->type)->free_func(ret->name, ret->type,
  267|      0|                                                      ret->data);
  268|      0|        }
  269|    484|        OPENSSL_free(ret);
  ------------------
  |  |  115|    484|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|    484|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|    484|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  270|    484|        ok = 1;
  271|    484|    }
  272|       |
  273|    484|    CRYPTO_THREAD_unlock(obj_lock);
  274|    484|    return ok;
  275|    484|}
OBJ_NAME_cleanup:
  368|      8|{
  369|      8|    unsigned long down_load;
  370|       |
  371|      8|    if (names_lh == NULL)
  ------------------
  |  Branch (371:9): [True: 0, False: 8]
  ------------------
  372|      0|        return;
  373|       |
  374|      8|    free_type = type;
  375|      8|    down_load = lh_OBJ_NAME_get_down_load(names_lh);
  376|      8|    lh_OBJ_NAME_set_down_load(names_lh, 0);
  377|       |
  378|      8|    lh_OBJ_NAME_doall(names_lh, names_lh_free_doall);
  379|      8|    if (type < 0) {
  ------------------
  |  Branch (379:9): [True: 2, False: 6]
  ------------------
  380|      2|        lh_OBJ_NAME_free(names_lh);
  381|      2|        sk_NAME_FUNCS_pop_free(name_funcs_stack, name_funcs_free);
  382|      2|        CRYPTO_THREAD_lock_free(obj_lock);
  383|      2|        names_lh = NULL;
  384|      2|        name_funcs_stack = NULL;
  385|      2|        obj_lock = NULL;
  386|      2|    } else
  387|      6|        lh_OBJ_NAME_set_down_load(names_lh, down_load);
  388|      8|}
o_names.c:o_names_init:
   51|      2|{
   52|      2|    names_lh = NULL;
   53|      2|    obj_lock = CRYPTO_THREAD_lock_new();
   54|      2|    if (obj_lock != NULL)
  ------------------
  |  Branch (54:9): [True: 2, False: 0]
  ------------------
   55|      2|        names_lh = lh_OBJ_NAME_new(obj_name_hash, obj_name_cmp);
   56|      2|    if (names_lh == NULL) {
  ------------------
  |  Branch (56:9): [True: 0, False: 2]
  ------------------
   57|      0|        CRYPTO_THREAD_lock_free(obj_lock);
   58|      0|        obj_lock = NULL;
   59|      0|    }
   60|      2|    return names_lh != NULL && obj_lock != NULL;
  ------------------
  |  Branch (60:12): [True: 2, False: 0]
  |  Branch (60:32): [True: 2, False: 0]
  ------------------
   61|      2|}
o_names.c:obj_name_hash:
  136|  1.33k|{
  137|  1.33k|    unsigned long ret;
  138|       |
  139|  1.33k|    if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (139:9): [True: 0, False: 1.33k]
  ------------------
  140|  1.33k|        && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type)) {
  ------------------
  |  Branch (140:12): [True: 0, False: 0]
  ------------------
  141|      0|        ret =
  142|      0|            sk_NAME_FUNCS_value(name_funcs_stack,
  143|      0|                                a->type)->hash_func(a->name);
  144|  1.33k|    } else {
  145|  1.33k|        ret = ossl_lh_strcasehash(a->name);
  146|  1.33k|    }
  147|  1.33k|    ret ^= a->type;
  148|  1.33k|    return ret;
  149|  1.33k|}
o_names.c:obj_name_cmp:
  120|    848|{
  121|    848|    int ret;
  122|       |
  123|    848|    ret = a->type - b->type;
  124|    848|    if (ret == 0) {
  ------------------
  |  Branch (124:9): [True: 848, False: 0]
  ------------------
  125|    848|        if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (125:13): [True: 0, False: 848]
  ------------------
  126|    848|            && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type)) {
  ------------------
  |  Branch (126:16): [True: 0, False: 0]
  ------------------
  127|      0|            ret = sk_NAME_FUNCS_value(name_funcs_stack,
  128|      0|                                      a->type)->cmp_func(a->name, b->name);
  129|      0|        } else
  130|    848|            ret = OPENSSL_strcasecmp(a->name, b->name);
  131|    848|    }
  132|    848|    return ret;
  133|    848|}
o_names.c:names_lh_free_doall:
  354|  1.08k|{
  355|  1.08k|    if (onp == NULL)
  ------------------
  |  Branch (355:9): [True: 0, False: 1.08k]
  ------------------
  356|      0|        return;
  357|       |
  358|  1.08k|    if (free_type < 0 || free_type == onp->type)
  ------------------
  |  Branch (358:9): [True: 0, False: 1.08k]
  |  Branch (358:26): [True: 484, False: 602]
  ------------------
  359|    484|        OBJ_NAME_remove(onp->name, onp->type);
  360|  1.08k|}

ossl_obj_cleanup_int:
  212|      2|{
  213|      2|    if (added != NULL) {
  ------------------
  |  Branch (213:9): [True: 0, False: 2]
  ------------------
  214|      0|        lh_ADDED_OBJ_set_down_load(added, 0);
  215|      0|        lh_ADDED_OBJ_doall(added, cleanup1_doall); /* zero counters */
  216|      0|        lh_ADDED_OBJ_doall(added, cleanup2_doall); /* set counters */
  217|      0|        lh_ADDED_OBJ_doall(added, cleanup3_doall); /* free objects */
  218|      0|        lh_ADDED_OBJ_free(added);
  219|      0|        added = NULL;
  220|      0|    }
  221|      2|    objs_free_locks();
  222|      2|}
OBJ_nid2obj:
  319|    728|{
  320|    728|    ADDED_OBJ ad, *adp = NULL;
  321|    728|    ASN1_OBJECT ob;
  322|       |
  323|    728|    if (n == NID_undef
  ------------------
  |  |   18|  1.45k|#define NID_undef                       0
  ------------------
  |  Branch (323:9): [True: 0, False: 728]
  ------------------
  324|    728|        || (n > 0 && n < NUM_NID && nid_objs[n].nid != NID_undef))
  ------------------
  |  | 1188|  1.45k|#define NUM_NID 1321
  ------------------
                      || (n > 0 && n < NUM_NID && nid_objs[n].nid != NID_undef))
  ------------------
  |  |   18|    728|#define NID_undef                       0
  ------------------
  |  Branch (324:13): [True: 728, False: 0]
  |  Branch (324:22): [True: 728, False: 0]
  |  Branch (324:37): [True: 728, False: 0]
  ------------------
  325|    728|        return (ASN1_OBJECT *)&(nid_objs[n]);
  326|       |
  327|      0|    ad.type = ADDED_NID;
  ------------------
  |  |   33|      0|#define ADDED_NID       3
  ------------------
  328|      0|    ad.obj = &ob;
  329|      0|    ob.nid = n;
  330|      0|    if (!ossl_obj_read_lock(1)) {
  ------------------
  |  Branch (330:9): [True: 0, False: 0]
  ------------------
  331|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  332|      0|        return NULL;
  333|      0|    }
  334|      0|    if (added != NULL)
  ------------------
  |  Branch (334:9): [True: 0, False: 0]
  ------------------
  335|      0|        adp = lh_ADDED_OBJ_retrieve(added, &ad);
  336|      0|    ossl_obj_unlock(1);
  337|      0|    if (adp != NULL)
  ------------------
  |  Branch (337:9): [True: 0, False: 0]
  ------------------
  338|      0|        return adp->obj;
  339|       |
  340|      0|    ERR_raise(ERR_LIB_OBJ, OBJ_R_UNKNOWN_NID);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  341|      0|    return NULL;
  342|      0|}
OBJ_nid2sn:
  345|    364|{
  346|    364|    ASN1_OBJECT *ob = OBJ_nid2obj(n);
  347|       |
  348|    364|    return ob == NULL ? NULL : ob->sn;
  ------------------
  |  Branch (348:12): [True: 0, False: 364]
  ------------------
  349|    364|}
OBJ_nid2ln:
  352|    364|{
  353|    364|    ASN1_OBJECT *ob = OBJ_nid2obj(n);
  354|       |
  355|    364|    return ob == NULL ? NULL : ob->ln;
  ------------------
  |  Branch (355:12): [True: 0, False: 364]
  ------------------
  356|    364|}
obj_dat.c:objs_free_locks:
   49|      2|{
   50|      2|    CRYPTO_THREAD_lock_free(ossl_obj_lock);
   51|      2|    ossl_obj_lock = NULL;
   52|       |#ifdef TSAN_REQUIRES_LOCKING
   53|       |    CRYPTO_THREAD_lock_free(ossl_obj_nid_lock);
   54|       |    ossl_obj_nid_lock = NULL;
   55|       |#endif
   56|      2|}

ossl_err_load_OBJ_strings:
   28|      2|{
   29|      2|#ifndef OPENSSL_NO_ERR
   30|      2|    if (ERR_reason_error_string(OBJ_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (30:9): [True: 2, False: 0]
  ------------------
   31|      2|        ERR_load_strings_const(OBJ_str_reasons);
   32|      2|#endif
   33|      2|    return 1;
   34|      2|}

OBJ_sigid_free:
  215|      2|{
  216|      2|    sk_nid_triple_pop_free(sig_app, sid_free);
  217|      2|    sk_nid_triple_free(sigx_app);
  218|      2|    CRYPTO_THREAD_lock_free(sig_lock);
  219|      2|    sig_app = NULL;
  220|      2|    sigx_app = NULL;
  221|      2|    sig_lock = NULL;
  222|      2|}

ossl_err_load_OCSP_strings:
   66|      2|{
   67|      2|# ifndef OPENSSL_NO_ERR
   68|      2|    if (ERR_reason_error_string(OCSP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (68:9): [True: 2, False: 0]
  ------------------
   69|      2|        ERR_load_strings_const(OCSP_str_reasons);
   70|      2|# endif
   71|      2|    return 1;
   72|      2|}

ossl_err_load_PEM_strings:
   68|      2|{
   69|      2|#ifndef OPENSSL_NO_ERR
   70|      2|    if (ERR_reason_error_string(PEM_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (70:9): [True: 2, False: 0]
  ------------------
   71|      2|        ERR_load_strings_const(PEM_str_reasons);
   72|      2|#endif
   73|      2|    return 1;
   74|      2|}

ossl_err_load_PKCS12_strings:
   56|      2|{
   57|      2|#ifndef OPENSSL_NO_ERR
   58|      2|    if (ERR_reason_error_string(PKCS12_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (58:9): [True: 2, False: 0]
  ------------------
   59|      2|        ERR_load_strings_const(PKCS12_str_reasons);
   60|      2|#endif
   61|      2|    return 1;
   62|      2|}

ossl_err_load_PKCS7_strings:
   92|      2|{
   93|      2|#ifndef OPENSSL_NO_ERR
   94|      2|    if (ERR_reason_error_string(PKCS7_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (94:9): [True: 2, False: 0]
  ------------------
   95|      2|        ERR_load_strings_const(PKCS7_str_reasons);
   96|      2|#endif
   97|      2|    return 1;
   98|      2|}

ossl_property_defns_free:
   52|      2|{
   53|      2|    LHASH_OF(PROPERTY_DEFN_ELEM) *property_defns = vproperty_defns;
  ------------------
  |  |  149|      2|# define LHASH_OF(type) struct lhash_st_##type
  ------------------
   54|       |
   55|      2|    if (property_defns != NULL) {
  ------------------
  |  Branch (55:9): [True: 2, False: 0]
  ------------------
   56|      2|        lh_PROPERTY_DEFN_ELEM_doall(property_defns,
   57|      2|                                    &property_defn_free);
   58|      2|        lh_PROPERTY_DEFN_ELEM_free(property_defns);
   59|      2|    }
   60|      2|}
ossl_property_defns_new:
   62|      4|void *ossl_property_defns_new(OSSL_LIB_CTX *ctx) {
   63|      4|    return lh_PROPERTY_DEFN_ELEM_new(&property_defn_hash, &property_defn_cmp);
   64|      4|}

ossl_ctx_global_properties_free:
  114|      2|{
  115|      2|    OSSL_GLOBAL_PROPERTIES *globp = vglobp;
  116|       |
  117|      2|    if (globp != NULL) {
  ------------------
  |  Branch (117:9): [True: 2, False: 0]
  ------------------
  118|      2|        ossl_property_free(globp->list);
  119|      2|        OPENSSL_free(globp);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  120|      2|    }
  121|      2|}
ossl_ctx_global_properties_new:
  124|      4|{
  125|      4|    return OPENSSL_zalloc(sizeof(OSSL_GLOBAL_PROPERTIES));
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  126|      4|}
ossl_method_store_new:
  243|     16|{
  244|     16|    OSSL_METHOD_STORE *res;
  245|       |
  246|     16|    res = OPENSSL_zalloc(sizeof(*res));
  ------------------
  |  |  104|     16|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     16|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     16|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  247|     16|    if (res != NULL) {
  ------------------
  |  Branch (247:9): [True: 16, False: 0]
  ------------------
  248|     16|        res->ctx = ctx;
  249|     16|        if ((res->algs = ossl_sa_ALGORITHM_new()) == NULL
  ------------------
  |  Branch (249:13): [True: 0, False: 16]
  ------------------
  250|     16|            || (res->lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (250:16): [True: 0, False: 16]
  ------------------
  251|     16|            || (res->biglock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (251:16): [True: 0, False: 16]
  ------------------
  252|      0|            ossl_method_store_free(res);
  253|      0|            return NULL;
  254|      0|        }
  255|     16|    }
  256|     16|    return res;
  257|     16|}
ossl_method_store_free:
  260|      8|{
  261|      8|    if (store != NULL) {
  ------------------
  |  Branch (261:9): [True: 8, False: 0]
  ------------------
  262|      8|        if (store->algs != NULL)
  ------------------
  |  Branch (262:13): [True: 8, False: 0]
  ------------------
  263|      8|            ossl_sa_ALGORITHM_doall_arg(store->algs, &alg_cleanup, store);
  264|      8|        ossl_sa_ALGORITHM_free(store->algs);
  265|      8|        CRYPTO_THREAD_lock_free(store->lock);
  266|      8|        CRYPTO_THREAD_lock_free(store->biglock);
  267|      8|        OPENSSL_free(store);
  ------------------
  |  |  115|      8|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      8|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      8|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  268|      8|    }
  269|      8|}
ossl_method_store_cache_flush_all:
  606|      8|{
  607|      8|    if (!ossl_property_write_lock(store))
  ------------------
  |  Branch (607:9): [True: 0, False: 8]
  ------------------
  608|      0|        return 0;
  609|      8|    ossl_sa_ALGORITHM_doall(store->algs, &impl_cache_flush_alg);
  610|      8|    store->cache_nelem = 0;
  611|      8|    ossl_property_unlock(store);
  612|      8|    return 1;
  613|      8|}
property.c:ossl_property_write_lock:
  177|      8|{
  178|      8|    return p != NULL ? CRYPTO_THREAD_write_lock(p->lock) : 0;
  ------------------
  |  Branch (178:12): [True: 8, False: 0]
  ------------------
  179|      8|}
property.c:ossl_property_unlock:
  182|      8|{
  183|      8|    return p != 0 ? CRYPTO_THREAD_unlock(p->lock) : 0;
  ------------------
  |  Branch (183:12): [True: 8, False: 0]
  ------------------
  184|      8|}

ossl_err_load_PROP_strings:
   40|      2|{
   41|      2|#ifndef OPENSSL_NO_ERR
   42|      2|    if (ERR_reason_error_string(PROP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (42:9): [True: 2, False: 0]
  ------------------
   43|      2|        ERR_load_strings_const(PROP_str_reasons);
   44|      2|#endif
   45|      2|    return 1;
   46|      2|}

ossl_property_free:
  530|      2|{
  531|      2|    OPENSSL_free(p);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  532|      2|}
ossl_property_parse_init:
  576|      4|{
  577|      4|    static const char *const predefined_names[] = {
  578|      4|        "provider",     /* Name of provider (default, legacy, fips) */
  579|      4|        "version",      /* Version number of this provider */
  580|      4|        "fips",         /* FIPS validated or FIPS supporting algorithm */
  581|      4|        "output",       /* Output type for encoders */
  582|      4|        "input",        /* Input type for decoders */
  583|      4|        "structure",    /* Structure name for encoders and decoders */
  584|      4|    };
  585|      4|    size_t i;
  586|       |
  587|     28|    for (i = 0; i < OSSL_NELEM(predefined_names); i++)
  ------------------
  |  |   14|     28|# define OSSL_NELEM(x)    (sizeof(x)/sizeof((x)[0]))
  ------------------
  |  Branch (587:17): [True: 24, False: 4]
  ------------------
  588|     24|        if (ossl_property_name(ctx, predefined_names[i], 1) == 0)
  ------------------
  |  Branch (588:13): [True: 0, False: 24]
  ------------------
  589|      0|            goto err;
  590|       |
  591|       |    /*
  592|       |     * Pre-populate the two Boolean values. We must do them before any other
  593|       |     * values and in this order so that we get the same index as the global
  594|       |     * OSSL_PROPERTY_TRUE and OSSL_PROPERTY_FALSE values
  595|       |     */
  596|      4|    if ((ossl_property_value(ctx, "yes", 1) != OSSL_PROPERTY_TRUE)
  ------------------
  |  |   37|      4|#define OSSL_PROPERTY_TRUE      1
  ------------------
  |  Branch (596:9): [True: 0, False: 4]
  ------------------
  597|      4|        || (ossl_property_value(ctx, "no", 1) != OSSL_PROPERTY_FALSE))
  ------------------
  |  |   38|      4|#define OSSL_PROPERTY_FALSE     2
  ------------------
  |  Branch (597:12): [True: 0, False: 4]
  ------------------
  598|      0|        goto err;
  599|       |
  600|      4|    return 1;
  601|      0|err:
  602|      0|    return 0;
  603|      4|}

ossl_property_string_data_free:
   77|      2|{
   78|      2|    PROPERTY_STRING_DATA *propdata = vpropdata;
   79|       |
   80|      2|    if (propdata == NULL)
  ------------------
  |  Branch (80:9): [True: 0, False: 2]
  ------------------
   81|      0|        return;
   82|       |
   83|      2|    CRYPTO_THREAD_lock_free(propdata->lock);
   84|      2|    property_table_free(&propdata->prop_names);
   85|      2|    property_table_free(&propdata->prop_values);
   86|      2|#ifndef OPENSSL_SMALL_FOOTPRINT
   87|      2|    sk_OPENSSL_CSTRING_free(propdata->prop_namelist);
  ------------------
  |  |  238|      2|#define sk_OPENSSL_CSTRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_CSTRING_sk_type(sk))
  ------------------
   88|      2|    sk_OPENSSL_CSTRING_free(propdata->prop_valuelist);
  ------------------
  |  |  238|      2|#define sk_OPENSSL_CSTRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_CSTRING_sk_type(sk))
  ------------------
   89|      2|    propdata->prop_namelist = propdata->prop_valuelist = NULL;
   90|      2|#endif
   91|      2|    propdata->prop_name_idx = propdata->prop_value_idx = 0;
   92|       |
   93|      2|    OPENSSL_free(propdata);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|      2|}
ossl_property_string_data_new:
   96|      4|void *ossl_property_string_data_new(OSSL_LIB_CTX *ctx) {
   97|      4|    PROPERTY_STRING_DATA *propdata = OPENSSL_zalloc(sizeof(*propdata));
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   98|       |
   99|      4|    if (propdata == NULL)
  ------------------
  |  Branch (99:9): [True: 0, False: 4]
  ------------------
  100|      0|        return NULL;
  101|       |
  102|      4|    propdata->lock = CRYPTO_THREAD_lock_new();
  103|      4|    propdata->prop_names = lh_PROPERTY_STRING_new(&property_hash,
  104|      4|                                                  &property_cmp);
  105|      4|    propdata->prop_values = lh_PROPERTY_STRING_new(&property_hash,
  106|      4|                                                   &property_cmp);
  107|      4|#ifndef OPENSSL_SMALL_FOOTPRINT
  108|      4|    propdata->prop_namelist = sk_OPENSSL_CSTRING_new_null();
  ------------------
  |  |  235|      4|#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_new_null())
  ------------------
  109|      4|    propdata->prop_valuelist = sk_OPENSSL_CSTRING_new_null();
  ------------------
  |  |  235|      4|#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_new_null())
  ------------------
  110|      4|#endif
  111|      4|    if (propdata->lock == NULL
  ------------------
  |  Branch (111:9): [True: 0, False: 4]
  ------------------
  112|      4|#ifndef OPENSSL_SMALL_FOOTPRINT
  113|      4|            || propdata->prop_namelist == NULL
  ------------------
  |  Branch (113:16): [True: 0, False: 4]
  ------------------
  114|      4|            || propdata->prop_valuelist == NULL
  ------------------
  |  Branch (114:16): [True: 0, False: 4]
  ------------------
  115|      4|#endif
  116|      4|            || propdata->prop_names == NULL
  ------------------
  |  Branch (116:16): [True: 0, False: 4]
  ------------------
  117|      4|            || propdata->prop_values == NULL) {
  ------------------
  |  Branch (117:16): [True: 0, False: 4]
  ------------------
  118|      0|        ossl_property_string_data_free(propdata);
  119|      0|        return NULL;
  120|      0|    }
  121|      4|    return propdata;
  122|      4|}
ossl_property_name:
  253|     24|{
  254|     24|    return ossl_property_string(ctx, 1, create, s);
  255|     24|}
ossl_property_value:
  264|      8|{
  265|      8|    return ossl_property_string(ctx, 0, create, s);
  266|      8|}
property_string.c:property_table_free:
   66|      4|{
   67|      4|    PROP_TABLE *t = *pt;
   68|       |
   69|      4|    if (t != NULL) {
  ------------------
  |  Branch (69:9): [True: 4, False: 0]
  ------------------
   70|      4|        lh_PROPERTY_STRING_doall(t, &property_free);
   71|      4|        lh_PROPERTY_STRING_free(t);
   72|      4|        *pt = NULL;
   73|      4|    }
   74|      4|}
property_string.c:property_free:
   61|     16|{
   62|     16|    OPENSSL_free(ps);
  ------------------
  |  |  115|     16|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     16|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     16|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   63|     16|}
property_string.c:property_hash:
   51|     96|{
   52|     96|    return OPENSSL_LH_strhash(a->s);
   53|     96|}
property_string.c:ossl_property_string:
  144|     32|{
  145|     32|    PROPERTY_STRING p, *ps, *ps_new;
  146|     32|    PROP_TABLE *t;
  147|     32|    OSSL_PROPERTY_IDX *pidx;
  148|     32|    PROPERTY_STRING_DATA *propdata
  149|     32|        = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_PROPERTY_STRING_INDEX);
  ------------------
  |  |   99|     32|# define OSSL_LIB_CTX_PROPERTY_STRING_INDEX          3
  ------------------
  150|       |
  151|     32|    if (propdata == NULL)
  ------------------
  |  Branch (151:9): [True: 0, False: 32]
  ------------------
  152|      0|        return 0;
  153|       |
  154|     32|    t = name ? propdata->prop_names : propdata->prop_values;
  ------------------
  |  Branch (154:9): [True: 24, False: 8]
  ------------------
  155|     32|    p.s = s;
  156|     32|    if (!CRYPTO_THREAD_read_lock(propdata->lock)) {
  ------------------
  |  Branch (156:9): [True: 0, False: 32]
  ------------------
  157|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  158|      0|        return 0;
  159|      0|    }
  160|     32|    ps = lh_PROPERTY_STRING_retrieve(t, &p);
  161|     32|    if (ps == NULL && create) {
  ------------------
  |  Branch (161:9): [True: 32, False: 0]
  |  Branch (161:23): [True: 32, False: 0]
  ------------------
  162|     32|        CRYPTO_THREAD_unlock(propdata->lock);
  163|     32|        if (!CRYPTO_THREAD_write_lock(propdata->lock)) {
  ------------------
  |  Branch (163:13): [True: 0, False: 32]
  ------------------
  164|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_WRITE_LOCK);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  165|      0|            return 0;
  166|      0|        }
  167|     32|        pidx = name ? &propdata->prop_name_idx : &propdata->prop_value_idx;
  ------------------
  |  Branch (167:16): [True: 24, False: 8]
  ------------------
  168|     32|        ps = lh_PROPERTY_STRING_retrieve(t, &p);
  169|     32|        if (ps == NULL && (ps_new = new_property_string(s, pidx)) != NULL) {
  ------------------
  |  Branch (169:13): [True: 32, False: 0]
  |  Branch (169:27): [True: 32, False: 0]
  ------------------
  170|     32|#ifndef OPENSSL_SMALL_FOOTPRINT
  171|     32|            STACK_OF(OPENSSL_CSTRING) *slist;
  ------------------
  |  |   31|     32|# define STACK_OF(type) struct stack_st_##type
  ------------------
  172|       |
  173|     32|            slist = name ? propdata->prop_namelist : propdata->prop_valuelist;
  ------------------
  |  Branch (173:21): [True: 24, False: 8]
  ------------------
  174|     32|            if (sk_OPENSSL_CSTRING_push(slist, ps_new->s) <= 0) {
  ------------------
  |  |  242|     32|#define sk_OPENSSL_CSTRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr))
  ------------------
  |  Branch (174:17): [True: 0, False: 32]
  ------------------
  175|      0|                property_free(ps_new);
  176|      0|                CRYPTO_THREAD_unlock(propdata->lock);
  177|      0|                return 0;
  178|      0|            }
  179|     32|#endif
  180|     32|            lh_PROPERTY_STRING_insert(t, ps_new);
  181|     32|            if (lh_PROPERTY_STRING_error(t)) {
  ------------------
  |  Branch (181:17): [True: 0, False: 32]
  ------------------
  182|       |                /*-
  183|       |                 * Undo the previous push which means also decrementing the
  184|       |                 * index and freeing the allocated storage.
  185|       |                 */
  186|      0|#ifndef OPENSSL_SMALL_FOOTPRINT
  187|      0|                sk_OPENSSL_CSTRING_pop(slist);
  ------------------
  |  |  244|      0|#define sk_OPENSSL_CSTRING_pop(sk) ((const char *)OPENSSL_sk_pop(ossl_check_OPENSSL_CSTRING_sk_type(sk)))
  ------------------
  188|      0|#endif
  189|      0|                property_free(ps_new);
  190|      0|                --*pidx;
  191|      0|                CRYPTO_THREAD_unlock(propdata->lock);
  192|      0|                return 0;
  193|      0|            }
  194|     32|            ps = ps_new;
  195|     32|        }
  196|     32|    }
  197|     32|    CRYPTO_THREAD_unlock(propdata->lock);
  198|     32|    return ps != NULL ? ps->idx : 0;
  ------------------
  |  Branch (198:12): [True: 32, False: 0]
  ------------------
  199|     32|}
property_string.c:new_property_string:
  126|     32|{
  127|     32|    const size_t l = strlen(s);
  128|     32|    PROPERTY_STRING *ps = OPENSSL_malloc(sizeof(*ps) + l);
  ------------------
  |  |  102|     32|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     32|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     32|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  129|       |
  130|     32|    if (ps != NULL) {
  ------------------
  |  Branch (130:9): [True: 32, False: 0]
  ------------------
  131|     32|        memcpy(ps->body, s, l + 1);
  132|     32|        ps->s = ps->body;
  133|     32|        ps->idx = ++*pidx;
  134|     32|        if (ps->idx == 0) {
  ------------------
  |  Branch (134:13): [True: 0, False: 32]
  ------------------
  135|      0|            OPENSSL_free(ps);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  136|      0|            return NULL;
  137|      0|        }
  138|     32|    }
  139|     32|    return ps;
  140|     32|}

OSSL_PROVIDER_try_load_ex:
   20|      2|{
   21|      2|    OSSL_PROVIDER *prov = NULL, *actual;
   22|      2|    int isnew = 0;
   23|       |
   24|       |    /* Find it or create it */
   25|      2|    if ((prov = ossl_provider_find(libctx, name, 0)) == NULL) {
  ------------------
  |  Branch (25:9): [True: 2, False: 0]
  ------------------
   26|      2|        if ((prov = ossl_provider_new(libctx, name, NULL, params, 0)) == NULL)
  ------------------
  |  Branch (26:13): [True: 0, False: 2]
  ------------------
   27|      0|            return NULL;
   28|      2|        isnew = 1;
   29|      2|    }
   30|       |
   31|      2|    if (!ossl_provider_activate(prov, 1, 0)) {
  ------------------
  |  Branch (31:9): [True: 0, False: 2]
  ------------------
   32|      0|        ossl_provider_free(prov);
   33|      0|        return NULL;
   34|      0|    }
   35|       |
   36|      2|    actual = prov;
   37|      2|    if (isnew && !ossl_provider_add_to_store(prov, &actual, retain_fallbacks)) {
  ------------------
  |  Branch (37:9): [True: 2, False: 0]
  |  Branch (37:18): [True: 0, False: 2]
  ------------------
   38|      0|        ossl_provider_deactivate(prov, 1);
   39|      0|        ossl_provider_free(prov);
   40|      0|        return NULL;
   41|      0|    }
   42|      2|    if (actual != prov) {
  ------------------
  |  Branch (42:9): [True: 0, False: 2]
  ------------------
   43|      0|        if (!ossl_provider_activate(actual, 1, 0)) {
  ------------------
  |  Branch (43:13): [True: 0, False: 0]
  ------------------
   44|      0|            ossl_provider_free(actual);
   45|      0|            return NULL;
   46|      0|        }
   47|      0|    }
   48|       |
   49|      2|    return actual;
   50|      2|}
OSSL_PROVIDER_try_load:
   54|      2|{
   55|      2|    return OSSL_PROVIDER_try_load_ex(libctx, name, NULL, retain_fallbacks);
   56|      2|}
OSSL_PROVIDER_add_builtin:
  128|      2|{
  129|      2|    OSSL_PROVIDER_INFO entry;
  130|       |
  131|      2|    if (name == NULL || init_fn == NULL) {
  ------------------
  |  Branch (131:9): [True: 0, False: 2]
  |  Branch (131:25): [True: 0, False: 2]
  ------------------
  132|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  133|      0|        return 0;
  134|      0|    }
  135|      2|    memset(&entry, 0, sizeof(entry));
  136|      2|    entry.name = OPENSSL_strdup(name);
  ------------------
  |  |  119|      2|        CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|      2|    if (entry.name == NULL)
  ------------------
  |  Branch (137:9): [True: 0, False: 2]
  ------------------
  138|      0|        return 0;
  139|      2|    entry.init = init_fn;
  140|      2|    if (!ossl_provider_info_add_to_store(libctx, &entry)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 2]
  ------------------
  141|      0|        ossl_provider_info_clear(&entry);
  142|      0|        return 0;
  143|      0|    }
  144|      2|    return 1;
  145|      2|}

ossl_child_prov_ctx_new:
   38|      4|{
   39|      4|    return OPENSSL_zalloc(sizeof(struct child_prov_globals));
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|      4|}
ossl_child_prov_ctx_free:
   43|      2|{
   44|      2|    struct child_prov_globals *gbl = vgbl;
   45|       |
   46|      2|    CRYPTO_THREAD_lock_free(gbl->lock);
   47|      2|    OPENSSL_free(gbl);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|      2|}

ossl_prov_conf_ctx_new:
   31|      4|{
   32|      4|    PROVIDER_CONF_GLOBAL *pcgbl = OPENSSL_zalloc(sizeof(*pcgbl));
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   33|       |
   34|      4|    if (pcgbl == NULL)
  ------------------
  |  Branch (34:9): [True: 0, False: 4]
  ------------------
   35|      0|        return NULL;
   36|       |
   37|      4|    pcgbl->lock = CRYPTO_THREAD_lock_new();
   38|      4|    if (pcgbl->lock == NULL) {
  ------------------
  |  Branch (38:9): [True: 0, False: 4]
  ------------------
   39|      0|        OPENSSL_free(pcgbl);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|      0|        return NULL;
   41|      0|    }
   42|       |
   43|      4|    return pcgbl;
   44|      4|}
ossl_prov_conf_ctx_free:
   47|      2|{
   48|      2|    PROVIDER_CONF_GLOBAL *pcgbl = vpcgbl;
   49|       |
   50|      2|    sk_OSSL_PROVIDER_pop_free(pcgbl->activated_providers,
   51|      2|                              ossl_provider_free);
   52|       |
   53|      2|    OSSL_TRACE(CONF, "Cleaned up providers\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   54|      2|    CRYPTO_THREAD_lock_free(pcgbl->lock);
   55|      2|    OPENSSL_free(pcgbl);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   56|      2|}

ossl_provider_info_clear:
  280|      2|{
  281|      2|    OPENSSL_free(info->name);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  282|      2|    OPENSSL_free(info->path);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  283|      2|    sk_INFOPAIR_pop_free(info->parameters, infopair_free);
  284|      2|}
ossl_provider_store_free:
  287|      2|{
  288|      2|    struct provider_store_st *store = vstore;
  289|      2|    size_t i;
  290|       |
  291|      2|    if (store == NULL)
  ------------------
  |  Branch (291:9): [True: 0, False: 2]
  ------------------
  292|      0|        return;
  293|      2|    store->freeing = 1;
  294|      2|    OPENSSL_free(store->default_path);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  295|      2|    sk_OSSL_PROVIDER_pop_free(store->providers, provider_deactivate_free);
  296|      2|#ifndef FIPS_MODULE
  297|      2|    sk_OSSL_PROVIDER_CHILD_CB_pop_free(store->child_cbs,
  298|      2|                                       ossl_provider_child_cb_free);
  299|      2|#endif
  300|      2|    CRYPTO_THREAD_lock_free(store->default_path_lock);
  301|      2|    CRYPTO_THREAD_lock_free(store->lock);
  302|      4|    for (i = 0; i < store->numprovinfo; i++)
  ------------------
  |  Branch (302:17): [True: 2, False: 2]
  ------------------
  303|      2|        ossl_provider_info_clear(&store->provinfo[i]);
  304|      2|    OPENSSL_free(store->provinfo);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  305|      2|    OPENSSL_free(store);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  306|      2|}
ossl_provider_store_new:
  309|      4|{
  310|      4|    struct provider_store_st *store = OPENSSL_zalloc(sizeof(*store));
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  311|       |
  312|      4|    if (store == NULL
  ------------------
  |  Branch (312:9): [True: 0, False: 4]
  ------------------
  313|      4|        || (store->providers = sk_OSSL_PROVIDER_new(ossl_provider_cmp)) == NULL
  ------------------
  |  Branch (313:12): [True: 0, False: 4]
  ------------------
  314|      4|        || (store->default_path_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (314:12): [True: 0, False: 4]
  ------------------
  315|      4|#ifndef FIPS_MODULE
  316|      4|        || (store->child_cbs = sk_OSSL_PROVIDER_CHILD_CB_new_null()) == NULL
  ------------------
  |  Branch (316:12): [True: 0, False: 4]
  ------------------
  317|      4|#endif
  318|      4|        || (store->lock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (318:12): [True: 0, False: 4]
  ------------------
  319|      0|        ossl_provider_store_free(store);
  320|      0|        return NULL;
  321|      0|    }
  322|      4|    store->libctx = ctx;
  323|      4|    store->use_fallbacks = 1;
  324|       |
  325|      4|    return store;
  326|      4|}
ossl_provider_info_add_to_store:
  356|      2|{
  357|      2|    struct provider_store_st *store = get_provider_store(libctx);
  358|      2|    int ret = 0;
  359|       |
  360|      2|    if (entry->name == NULL) {
  ------------------
  |  Branch (360:9): [True: 0, False: 2]
  ------------------
  361|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  362|      0|        return 0;
  363|      0|    }
  364|       |
  365|      2|    if (store == NULL) {
  ------------------
  |  Branch (365:9): [True: 0, False: 2]
  ------------------
  366|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  367|      0|        return 0;
  368|      0|    }
  369|       |
  370|      2|    if (!CRYPTO_THREAD_write_lock(store->lock))
  ------------------
  |  Branch (370:9): [True: 0, False: 2]
  ------------------
  371|      0|        return 0;
  372|      2|    if (store->provinfosz == 0) {
  ------------------
  |  Branch (372:9): [True: 2, False: 0]
  ------------------
  373|      2|        store->provinfo = OPENSSL_zalloc(sizeof(*store->provinfo)
  ------------------
  |  |  104|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  374|      2|                                         * BUILTINS_BLOCK_SIZE);
  375|      2|        if (store->provinfo == NULL)
  ------------------
  |  Branch (375:13): [True: 0, False: 2]
  ------------------
  376|      0|            goto err;
  377|      2|        store->provinfosz = BUILTINS_BLOCK_SIZE;
  ------------------
  |  |  352|      2|#define BUILTINS_BLOCK_SIZE     10
  ------------------
  378|      2|    } else if (store->numprovinfo == store->provinfosz) {
  ------------------
  |  Branch (378:16): [True: 0, False: 0]
  ------------------
  379|      0|        OSSL_PROVIDER_INFO *tmpbuiltins;
  380|      0|        size_t newsz = store->provinfosz + BUILTINS_BLOCK_SIZE;
  ------------------
  |  |  352|      0|#define BUILTINS_BLOCK_SIZE     10
  ------------------
  381|       |
  382|      0|        tmpbuiltins = OPENSSL_realloc(store->provinfo,
  ------------------
  |  |  109|      0|        CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  383|      0|                                      sizeof(*store->provinfo) * newsz);
  384|      0|        if (tmpbuiltins == NULL)
  ------------------
  |  Branch (384:13): [True: 0, False: 0]
  ------------------
  385|      0|            goto err;
  386|      0|        store->provinfo = tmpbuiltins;
  387|      0|        store->provinfosz = newsz;
  388|      0|    }
  389|      2|    store->provinfo[store->numprovinfo] = *entry;
  390|      2|    store->numprovinfo++;
  391|       |
  392|      2|    ret = 1;
  393|      2| err:
  394|      2|    CRYPTO_THREAD_unlock(store->lock);
  395|      2|    return ret;
  396|      2|}
ossl_provider_find:
  400|      2|{
  401|      2|    struct provider_store_st *store = NULL;
  402|      2|    OSSL_PROVIDER *prov = NULL;
  403|       |
  404|      2|    if ((store = get_provider_store(libctx)) != NULL) {
  ------------------
  |  Branch (404:9): [True: 2, False: 0]
  ------------------
  405|      2|        OSSL_PROVIDER tmpl = { 0, };
  406|      2|        int i;
  407|       |
  408|      2|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
  409|       |        /*
  410|       |         * Make sure any providers are loaded from config before we try to find
  411|       |         * them.
  412|       |         */
  413|      2|        if (!noconfig) {
  ------------------
  |  Branch (413:13): [True: 2, False: 0]
  ------------------
  414|      2|            if (ossl_lib_ctx_is_default(libctx))
  ------------------
  |  Branch (414:17): [True: 2, False: 0]
  ------------------
  415|      2|                OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  ------------------
  |  |  468|      2|# define OPENSSL_INIT_LOAD_CONFIG            0x00000040L
  ------------------
  416|      2|        }
  417|      2|#endif
  418|       |
  419|      2|        tmpl.name = (char *)name;
  420|      2|        if (!CRYPTO_THREAD_write_lock(store->lock))
  ------------------
  |  Branch (420:13): [True: 0, False: 2]
  ------------------
  421|      0|            return NULL;
  422|      2|        sk_OSSL_PROVIDER_sort(store->providers);
  423|      2|        if ((i = sk_OSSL_PROVIDER_find(store->providers, &tmpl)) != -1)
  ------------------
  |  Branch (423:13): [True: 0, False: 2]
  ------------------
  424|      0|            prov = sk_OSSL_PROVIDER_value(store->providers, i);
  425|      2|        CRYPTO_THREAD_unlock(store->lock);
  426|      2|        if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (426:13): [True: 0, False: 2]
  |  Branch (426:29): [True: 0, False: 0]
  ------------------
  427|      0|            prov = NULL;
  428|      2|    }
  429|       |
  430|      2|    return prov;
  431|      2|}
ossl_provider_up_ref:
  476|      2|{
  477|      2|    int ref = 0;
  478|       |
  479|      2|    if (CRYPTO_UP_REF(&prov->refcnt, &ref) <= 0)
  ------------------
  |  Branch (479:9): [True: 0, False: 2]
  ------------------
  480|      0|        return 0;
  481|       |
  482|      2|#ifndef FIPS_MODULE
  483|      2|    if (prov->ischild) {
  ------------------
  |  Branch (483:9): [True: 0, False: 2]
  ------------------
  484|      0|        if (!ossl_provider_up_ref_parent(prov, 0)) {
  ------------------
  |  Branch (484:13): [True: 0, False: 0]
  ------------------
  485|      0|            ossl_provider_free(prov);
  486|      0|            return 0;
  487|      0|        }
  488|      0|    }
  489|      2|#endif
  490|       |
  491|      2|    return ref;
  492|      2|}
ossl_provider_new:
  521|      2|{
  522|      2|    struct provider_store_st *store = NULL;
  523|      2|    OSSL_PROVIDER_INFO template;
  524|      2|    OSSL_PROVIDER *prov = NULL;
  525|       |
  526|      2|    if ((store = get_provider_store(libctx)) == NULL)
  ------------------
  |  Branch (526:9): [True: 0, False: 2]
  ------------------
  527|      0|        return NULL;
  528|       |
  529|      2|    memset(&template, 0, sizeof(template));
  530|      2|    if (init_function == NULL) {
  ------------------
  |  Branch (530:9): [True: 2, False: 0]
  ------------------
  531|      2|        const OSSL_PROVIDER_INFO *p;
  532|      2|        size_t i;
  533|       |
  534|       |        /* Check if this is a predefined builtin provider */
  535|      8|        for (p = ossl_predefined_providers; p->name != NULL; p++) {
  ------------------
  |  Branch (535:45): [True: 6, False: 2]
  ------------------
  536|      6|            if (strcmp(p->name, name) == 0) {
  ------------------
  |  Branch (536:17): [True: 0, False: 6]
  ------------------
  537|      0|                template = *p;
  538|      0|                break;
  539|      0|            }
  540|      6|        }
  541|      2|        if (p->name == NULL) {
  ------------------
  |  Branch (541:13): [True: 2, False: 0]
  ------------------
  542|       |            /* Check if this is a user added provider */
  543|      2|            if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (543:17): [True: 0, False: 2]
  ------------------
  544|      0|                return NULL;
  545|      2|            for (i = 0, p = store->provinfo; i < store->numprovinfo; p++, i++) {
  ------------------
  |  Branch (545:46): [True: 2, False: 0]
  ------------------
  546|      2|                if (strcmp(p->name, name) == 0) {
  ------------------
  |  Branch (546:21): [True: 2, False: 0]
  ------------------
  547|      2|                    template = *p;
  548|      2|                    break;
  549|      2|                }
  550|      2|            }
  551|      2|            CRYPTO_THREAD_unlock(store->lock);
  552|      2|        }
  553|      2|    } else {
  554|      0|        template.init = init_function;
  555|      0|    }
  556|       |
  557|      2|    if (params != NULL) {
  ------------------
  |  Branch (557:9): [True: 0, False: 2]
  ------------------
  558|      0|        int i;
  559|       |
  560|      0|        template.parameters = sk_INFOPAIR_new_null();
  561|      0|        if (template.parameters == NULL)
  ------------------
  |  Branch (561:13): [True: 0, False: 0]
  ------------------
  562|      0|            return NULL;
  563|       |
  564|      0|        for (i = 0; params[i].key != NULL; i++) {
  ------------------
  |  Branch (564:21): [True: 0, False: 0]
  ------------------
  565|      0|            if (params[i].data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|# define OSSL_PARAM_UTF8_STRING          4
  ------------------
  |  Branch (565:17): [True: 0, False: 0]
  ------------------
  566|      0|                continue;
  567|      0|            if (ossl_provider_info_add_parameter(&template, params[i].key,
  ------------------
  |  Branch (567:17): [True: 0, False: 0]
  ------------------
  568|      0|                                                 (char *)params[i].data) <= 0) {
  569|      0|                sk_INFOPAIR_pop_free(template.parameters, infopair_free);
  570|      0|                return NULL;
  571|      0|            }
  572|      0|        }
  573|      0|    }
  574|       |
  575|       |    /* provider_new() generates an error, so no need here */
  576|      2|    prov = provider_new(name, template.init, template.parameters);
  577|       |
  578|      2|    if (params != NULL) /* We copied the parameters, let's free them */
  ------------------
  |  Branch (578:9): [True: 0, False: 2]
  ------------------
  579|      0|        sk_INFOPAIR_pop_free(template.parameters, infopair_free);
  580|       |
  581|      2|    if (prov == NULL)
  ------------------
  |  Branch (581:9): [True: 0, False: 2]
  ------------------
  582|      0|        return NULL;
  583|       |
  584|      2|    if (!ossl_provider_set_module_path(prov, template.path)) {
  ------------------
  |  Branch (584:9): [True: 0, False: 2]
  ------------------
  585|      0|        ossl_provider_free(prov);
  586|      0|        return NULL;
  587|      0|    }
  588|       |
  589|      2|    prov->libctx = libctx;
  590|      2|#ifndef FIPS_MODULE
  591|      2|    prov->error_lib = ERR_get_next_error_library();
  592|      2|#endif
  593|       |
  594|       |    /*
  595|       |     * At this point, the provider is only partially "loaded".  To be
  596|       |     * fully "loaded", ossl_provider_activate() must also be called and it must
  597|       |     * then be added to the provider store.
  598|       |     */
  599|       |
  600|      2|    return prov;
  601|      2|}
ossl_provider_add_to_store:
  628|      2|{
  629|      2|    struct provider_store_st *store;
  630|      2|    int idx;
  631|      2|    OSSL_PROVIDER tmpl = { 0, };
  632|      2|    OSSL_PROVIDER *actualtmp = NULL;
  633|       |
  634|      2|    if (actualprov != NULL)
  ------------------
  |  Branch (634:9): [True: 2, False: 0]
  ------------------
  635|      2|        *actualprov = NULL;
  636|       |
  637|      2|    if ((store = get_provider_store(prov->libctx)) == NULL)
  ------------------
  |  Branch (637:9): [True: 0, False: 2]
  ------------------
  638|      0|        return 0;
  639|       |
  640|      2|    if (!CRYPTO_THREAD_write_lock(store->lock))
  ------------------
  |  Branch (640:9): [True: 0, False: 2]
  ------------------
  641|      0|        return 0;
  642|       |
  643|      2|    tmpl.name = (char *)prov->name;
  644|      2|    idx = sk_OSSL_PROVIDER_find(store->providers, &tmpl);
  645|      2|    if (idx == -1)
  ------------------
  |  Branch (645:9): [True: 2, False: 0]
  ------------------
  646|      2|        actualtmp = prov;
  647|      0|    else
  648|      0|        actualtmp = sk_OSSL_PROVIDER_value(store->providers, idx);
  649|       |
  650|      2|    if (idx == -1) {
  ------------------
  |  Branch (650:9): [True: 2, False: 0]
  ------------------
  651|      2|        if (sk_OSSL_PROVIDER_push(store->providers, prov) == 0)
  ------------------
  |  Branch (651:13): [True: 0, False: 2]
  ------------------
  652|      0|            goto err;
  653|      2|        prov->store = store;
  654|      2|        if (!create_provider_children(prov)) {
  ------------------
  |  Branch (654:13): [True: 0, False: 2]
  ------------------
  655|      0|            sk_OSSL_PROVIDER_delete_ptr(store->providers, prov);
  656|      0|            goto err;
  657|      0|        }
  658|      2|        if (!retain_fallbacks)
  ------------------
  |  Branch (658:13): [True: 0, False: 2]
  ------------------
  659|      0|            store->use_fallbacks = 0;
  660|      2|    }
  661|       |
  662|      2|    CRYPTO_THREAD_unlock(store->lock);
  663|       |
  664|      2|    if (actualprov != NULL) {
  ------------------
  |  Branch (664:9): [True: 2, False: 0]
  ------------------
  665|      2|        if (!ossl_provider_up_ref(actualtmp)) {
  ------------------
  |  Branch (665:13): [True: 0, False: 2]
  ------------------
  666|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  667|      0|            actualtmp = NULL;
  668|      0|            return 0;
  669|      0|        }
  670|      2|        *actualprov = actualtmp;
  671|      2|    }
  672|       |
  673|      2|    if (idx >= 0) {
  ------------------
  |  Branch (673:9): [True: 0, False: 2]
  ------------------
  674|       |        /*
  675|       |         * The provider is already in the store. Probably two threads
  676|       |         * independently initialised their own provider objects with the same
  677|       |         * name and raced to put them in the store. This thread lost. We
  678|       |         * deactivate the one we just created and use the one that already
  679|       |         * exists instead.
  680|       |         * If we get here then we know we did not create provider children
  681|       |         * above, so we inform ossl_provider_deactivate not to attempt to remove
  682|       |         * any.
  683|       |         */
  684|      0|        ossl_provider_deactivate(prov, 0);
  685|      0|        ossl_provider_free(prov);
  686|      0|    }
  687|      2|#ifndef FIPS_MODULE
  688|      2|    else {
  689|       |        /*
  690|       |         * This can be done outside the lock. We tolerate other threads getting
  691|       |         * the wrong result briefly when creating OSSL_DECODER_CTXs.
  692|       |         */
  693|      2|        ossl_decoder_cache_flush(prov->libctx);
  694|      2|    }
  695|      2|#endif
  696|       |
  697|      2|    return 1;
  698|       |
  699|      0| err:
  700|      0|    CRYPTO_THREAD_unlock(store->lock);
  701|      0|    return 0;
  702|      2|}
ossl_provider_free:
  705|      2|{
  706|      2|    if (prov != NULL) {
  ------------------
  |  Branch (706:9): [True: 2, False: 0]
  ------------------
  707|      2|        int ref = 0;
  708|       |
  709|      2|        CRYPTO_DOWN_REF(&prov->refcnt, &ref);
  710|       |
  711|       |        /*
  712|       |         * When the refcount drops to zero, we clean up the provider.
  713|       |         * Note that this also does teardown, which may seem late,
  714|       |         * considering that init happens on first activation.  However,
  715|       |         * there may be other structures hanging on to the provider after
  716|       |         * the last deactivation and may therefore need full access to the
  717|       |         * provider's services.  Therefore, we deinit late.
  718|       |         */
  719|      2|        if (ref == 0) {
  ------------------
  |  Branch (719:13): [True: 0, False: 2]
  ------------------
  720|      0|            if (prov->flag_initialized) {
  ------------------
  |  Branch (720:17): [True: 0, False: 0]
  ------------------
  721|      0|                ossl_provider_teardown(prov);
  722|      0|#ifndef OPENSSL_NO_ERR
  723|      0|# ifndef FIPS_MODULE
  724|      0|                if (prov->error_strings != NULL) {
  ------------------
  |  Branch (724:21): [True: 0, False: 0]
  ------------------
  725|      0|                    ERR_unload_strings(prov->error_lib, prov->error_strings);
  726|      0|                    OPENSSL_free(prov->error_strings);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  727|      0|                    prov->error_strings = NULL;
  728|      0|                }
  729|      0|# endif
  730|      0|#endif
  731|      0|                OPENSSL_free(prov->operation_bits);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  732|      0|                prov->operation_bits = NULL;
  733|      0|                prov->operation_bits_sz = 0;
  734|      0|                prov->flag_initialized = 0;
  735|      0|            }
  736|       |
  737|      0|#ifndef FIPS_MODULE
  738|       |            /*
  739|       |             * We deregister thread handling whether or not the provider was
  740|       |             * initialized. If init was attempted but was not successful then
  741|       |             * the provider may still have registered a thread handler.
  742|       |             */
  743|      0|            ossl_init_thread_deregister(prov);
  744|      0|            DSO_free(prov->module);
  745|      0|#endif
  746|      0|            OPENSSL_free(prov->name);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  747|      0|            OPENSSL_free(prov->path);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  748|      0|            sk_INFOPAIR_pop_free(prov->parameters, infopair_free);
  749|      0|            CRYPTO_THREAD_lock_free(prov->opbits_lock);
  750|      0|            CRYPTO_THREAD_lock_free(prov->flag_lock);
  751|      0|            CRYPTO_THREAD_lock_free(prov->activatecnt_lock);
  752|      0|            CRYPTO_FREE_REF(&prov->refcnt);
  753|      0|            OPENSSL_free(prov);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  754|      0|        }
  755|      2|#ifndef FIPS_MODULE
  756|      2|        else if (prov->ischild) {
  ------------------
  |  Branch (756:18): [True: 0, False: 2]
  ------------------
  757|      0|            ossl_provider_free_parent(prov, 0);
  758|      0|        }
  759|      2|#endif
  760|      2|    }
  761|      2|}
ossl_provider_set_module_path:
  765|      2|{
  766|      2|    OPENSSL_free(prov->path);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  767|      2|    prov->path = NULL;
  768|      2|    if (module_path == NULL)
  ------------------
  |  Branch (768:9): [True: 2, False: 0]
  ------------------
  769|      2|        return 1;
  770|      0|    if ((prov->path = OPENSSL_strdup(module_path)) != NULL)
  ------------------
  |  |  119|      0|        CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (770:9): [True: 0, False: 0]
  ------------------
  771|      0|        return 1;
  772|      0|    return 0;
  773|      0|}
ossl_provider_activate:
 1301|      2|{
 1302|      2|    int count;
 1303|       |
 1304|      2|    if (prov == NULL)
  ------------------
  |  Branch (1304:9): [True: 0, False: 2]
  ------------------
 1305|      0|        return 0;
 1306|      2|#ifndef FIPS_MODULE
 1307|       |    /*
 1308|       |     * If aschild is true, then we only actually do the activation if the
 1309|       |     * provider is a child. If its not, this is still success.
 1310|       |     */
 1311|      2|    if (aschild && !prov->ischild)
  ------------------
  |  Branch (1311:9): [True: 0, False: 2]
  |  Branch (1311:20): [True: 0, False: 0]
  ------------------
 1312|      0|        return 1;
 1313|      2|#endif
 1314|      2|    if ((count = provider_activate(prov, 1, upcalls)) > 0)
  ------------------
  |  Branch (1314:9): [True: 2, False: 0]
  ------------------
 1315|      2|        return count == 1 ? provider_flush_store_cache(prov) : 1;
  ------------------
  |  Branch (1315:16): [True: 2, False: 0]
  ------------------
 1316|       |
 1317|      0|    return 0;
 1318|      2|}
ossl_provider_deactivate:
 1321|      2|{
 1322|      2|    int count;
 1323|       |
 1324|      2|    if (prov == NULL
  ------------------
  |  Branch (1324:9): [True: 0, False: 2]
  ------------------
 1325|      2|            || (count = provider_deactivate(prov, 1, removechildren)) < 0)
  ------------------
  |  Branch (1325:16): [True: 0, False: 2]
  ------------------
 1326|      0|        return 0;
 1327|      2|    return count == 0 ? provider_remove_store_methods(prov) : 1;
  ------------------
  |  Branch (1327:12): [True: 2, False: 0]
  ------------------
 1328|      2|}
provider_core.c:provider_deactivate_free:
  236|      2|{
  237|      2|    if (prov->flag_activated)
  ------------------
  |  Branch (237:9): [True: 2, False: 0]
  ------------------
  238|      2|        ossl_provider_deactivate(prov, 1);
  239|      2|    ossl_provider_free(prov);
  240|      2|}
provider_core.c:get_provider_store:
  329|     14|{
  330|     14|    struct provider_store_st *store = NULL;
  331|       |
  332|     14|    store = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_PROVIDER_STORE_INDEX);
  ------------------
  |  |   97|     14|# define OSSL_LIB_CTX_PROVIDER_STORE_INDEX           1
  ------------------
  333|     14|    if (store == NULL)
  ------------------
  |  Branch (333:9): [True: 0, False: 14]
  ------------------
  334|     14|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  335|     14|    return store;
  336|     14|}
provider_core.c:provider_new:
  441|      2|{
  442|      2|    OSSL_PROVIDER *prov = NULL;
  443|       |
  444|      2|    if ((prov = OPENSSL_zalloc(sizeof(*prov))) == NULL)
  ------------------
  |  |  104|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (444:9): [True: 0, False: 2]
  ------------------
  445|      0|        return NULL;
  446|      2|    if (!CRYPTO_NEW_REF(&prov->refcnt, 1)) {
  ------------------
  |  Branch (446:9): [True: 0, False: 2]
  ------------------
  447|      0|        OPENSSL_free(prov);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  448|      0|        return NULL;
  449|      0|    }
  450|      2|    if ((prov->activatecnt_lock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (450:9): [True: 0, False: 2]
  ------------------
  451|      0|        ossl_provider_free(prov);
  452|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  453|      0|        return NULL;
  454|      0|    }
  455|       |
  456|      2|    if ((prov->opbits_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (456:9): [True: 0, False: 2]
  ------------------
  457|      2|        || (prov->flag_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (457:12): [True: 0, False: 2]
  ------------------
  458|      2|        || (prov->parameters = sk_INFOPAIR_deep_copy(parameters,
  ------------------
  |  Branch (458:12): [True: 0, False: 2]
  ------------------
  459|      2|                                                     infopair_copy,
  460|      2|                                                     infopair_free)) == NULL) {
  461|      0|        ossl_provider_free(prov);
  462|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  463|      0|        return NULL;
  464|      0|    }
  465|      2|    if ((prov->name = OPENSSL_strdup(name)) == NULL) {
  ------------------
  |  |  119|      2|        CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (465:9): [True: 0, False: 2]
  ------------------
  466|      0|        ossl_provider_free(prov);
  467|      0|        return NULL;
  468|      0|    }
  469|       |
  470|      2|    prov->init_function = init_function;
  471|       |
  472|      2|    return prov;
  473|      2|}
provider_core.c:create_provider_children:
  605|      2|{
  606|      2|    int ret = 1;
  607|      2|#ifndef FIPS_MODULE
  608|      2|    struct provider_store_st *store = prov->store;
  609|      2|    OSSL_PROVIDER_CHILD_CB *child_cb;
  610|      2|    int i, max;
  611|       |
  612|      2|    max = sk_OSSL_PROVIDER_CHILD_CB_num(store->child_cbs);
  613|      2|    for (i = 0; i < max; i++) {
  ------------------
  |  Branch (613:17): [True: 0, False: 2]
  ------------------
  614|       |        /*
  615|       |         * This is newly activated (activatecnt == 1), so we need to
  616|       |         * create child providers as necessary.
  617|       |         */
  618|      0|        child_cb = sk_OSSL_PROVIDER_CHILD_CB_value(store->child_cbs, i);
  619|      0|        ret &= child_cb->create_cb((OSSL_CORE_HANDLE *)prov, child_cb->cbdata);
  620|      0|    }
  621|      2|#endif
  622|       |
  623|      2|    return ret;
  624|      2|}
provider_core.c:provider_activate:
 1165|      2|{
 1166|      2|    int count = -1;
 1167|      2|    struct provider_store_st *store;
 1168|      2|    int ret = 1;
 1169|       |
 1170|      2|    store = prov->store;
 1171|       |    /*
 1172|       |    * If the provider hasn't been added to the store, then we don't need
 1173|       |    * any locks because we've not shared it with other threads.
 1174|       |    */
 1175|      2|    if (store == NULL) {
  ------------------
  |  Branch (1175:9): [True: 2, False: 0]
  ------------------
 1176|      2|        lock = 0;
 1177|      2|        if (!provider_init(prov))
  ------------------
  |  Branch (1177:13): [True: 0, False: 2]
  ------------------
 1178|      0|            return -1;
 1179|      2|    }
 1180|       |
 1181|      2|#ifndef FIPS_MODULE
 1182|      2|    if (prov->ischild && upcalls && !ossl_provider_up_ref_parent(prov, 1))
  ------------------
  |  Branch (1182:9): [True: 0, False: 2]
  |  Branch (1182:26): [True: 0, False: 0]
  |  Branch (1182:37): [True: 0, False: 0]
  ------------------
 1183|      0|        return -1;
 1184|      2|#endif
 1185|       |
 1186|      2|    if (lock && !CRYPTO_THREAD_read_lock(store->lock)) {
  ------------------
  |  Branch (1186:9): [True: 0, False: 2]
  |  Branch (1186:17): [True: 0, False: 0]
  ------------------
 1187|      0|#ifndef FIPS_MODULE
 1188|      0|        if (prov->ischild && upcalls)
  ------------------
  |  Branch (1188:13): [True: 0, False: 0]
  |  Branch (1188:30): [True: 0, False: 0]
  ------------------
 1189|      0|            ossl_provider_free_parent(prov, 1);
 1190|      0|#endif
 1191|      0|        return -1;
 1192|      0|    }
 1193|       |
 1194|      2|    if (lock && !CRYPTO_THREAD_write_lock(prov->flag_lock)) {
  ------------------
  |  Branch (1194:9): [True: 0, False: 2]
  |  Branch (1194:17): [True: 0, False: 0]
  ------------------
 1195|      0|        CRYPTO_THREAD_unlock(store->lock);
 1196|      0|#ifndef FIPS_MODULE
 1197|      0|        if (prov->ischild && upcalls)
  ------------------
  |  Branch (1197:13): [True: 0, False: 0]
  |  Branch (1197:30): [True: 0, False: 0]
  ------------------
 1198|      0|            ossl_provider_free_parent(prov, 1);
 1199|      0|#endif
 1200|      0|        return -1;
 1201|      0|    }
 1202|      2|    if (CRYPTO_atomic_add(&prov->activatecnt, 1, &count, prov->activatecnt_lock)) {
  ------------------
  |  Branch (1202:9): [True: 2, False: 0]
  ------------------
 1203|      2|        prov->flag_activated = 1;
 1204|       |
 1205|      2|        if (count == 1 && store != NULL) {
  ------------------
  |  Branch (1205:13): [True: 2, False: 0]
  |  Branch (1205:27): [True: 0, False: 2]
  ------------------
 1206|      0|            ret = create_provider_children(prov);
 1207|      0|        }
 1208|      2|    }
 1209|      2|    if (lock) {
  ------------------
  |  Branch (1209:9): [True: 0, False: 2]
  ------------------
 1210|      0|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1211|      0|        CRYPTO_THREAD_unlock(store->lock);
 1212|       |        /*
 1213|       |         * This can be done outside the lock. We tolerate other threads getting
 1214|       |         * the wrong result briefly when creating OSSL_DECODER_CTXs.
 1215|       |         */
 1216|      0|#ifndef FIPS_MODULE
 1217|      0|        if (count == 1)
  ------------------
  |  Branch (1217:13): [True: 0, False: 0]
  ------------------
 1218|      0|            ossl_decoder_cache_flush(prov->libctx);
 1219|      0|#endif
 1220|      0|    }
 1221|       |
 1222|      2|    if (!ret)
  ------------------
  |  Branch (1222:9): [True: 0, False: 2]
  ------------------
 1223|      0|        return -1;
 1224|       |
 1225|      2|    return count;
 1226|      2|}
provider_core.c:provider_init:
  871|      2|{
  872|      2|    const OSSL_DISPATCH *provider_dispatch = NULL;
  873|      2|    void *tmp_provctx = NULL;    /* safety measure */
  874|      2|#ifndef OPENSSL_NO_ERR
  875|      2|# ifndef FIPS_MODULE
  876|      2|    OSSL_FUNC_provider_get_reason_strings_fn *p_get_reason_strings = NULL;
  877|      2|# endif
  878|      2|#endif
  879|      2|    int ok = 0;
  880|       |
  881|      2|    if (!ossl_assert(!prov->flag_initialized)) {
  ------------------
  |  |   52|      2|#  define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: "#x, \
  |  |   53|      2|                                         __FILE__, __LINE__)
  ------------------
  |  Branch (881:9): [True: 0, False: 2]
  ------------------
  882|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  883|      0|        goto end;
  884|      0|    }
  885|       |
  886|       |    /*
  887|       |     * If the init function isn't set, it indicates that this provider is
  888|       |     * a loadable module.
  889|       |     */
  890|      2|    if (prov->init_function == NULL) {
  ------------------
  |  Branch (890:9): [True: 0, False: 2]
  ------------------
  891|       |#ifdef FIPS_MODULE
  892|       |        goto end;
  893|       |#else
  894|      0|        if (prov->module == NULL) {
  ------------------
  |  Branch (894:13): [True: 0, False: 0]
  ------------------
  895|      0|            char *allocated_path = NULL;
  896|      0|            const char *module_path = NULL;
  897|      0|            char *merged_path = NULL;
  898|      0|            const char *load_dir = NULL;
  899|      0|            char *allocated_load_dir = NULL;
  900|      0|            struct provider_store_st *store;
  901|       |
  902|      0|            if ((prov->module = DSO_new()) == NULL) {
  ------------------
  |  Branch (902:17): [True: 0, False: 0]
  ------------------
  903|       |                /* DSO_new() generates an error already */
  904|      0|                goto end;
  905|      0|            }
  906|       |
  907|      0|            if ((store = get_provider_store(prov->libctx)) == NULL
  ------------------
  |  Branch (907:17): [True: 0, False: 0]
  ------------------
  908|      0|                    || !CRYPTO_THREAD_read_lock(store->default_path_lock))
  ------------------
  |  Branch (908:24): [True: 0, False: 0]
  ------------------
  909|      0|                goto end;
  910|       |
  911|      0|            if (store->default_path != NULL) {
  ------------------
  |  Branch (911:17): [True: 0, False: 0]
  ------------------
  912|      0|                allocated_load_dir = OPENSSL_strdup(store->default_path);
  ------------------
  |  |  119|      0|        CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  913|      0|                CRYPTO_THREAD_unlock(store->default_path_lock);
  914|      0|                if (allocated_load_dir == NULL)
  ------------------
  |  Branch (914:21): [True: 0, False: 0]
  ------------------
  915|      0|                    goto end;
  916|      0|                load_dir = allocated_load_dir;
  917|      0|            } else {
  918|      0|                CRYPTO_THREAD_unlock(store->default_path_lock);
  919|      0|            }
  920|       |
  921|      0|            if (load_dir == NULL) {
  ------------------
  |  Branch (921:17): [True: 0, False: 0]
  ------------------
  922|      0|                load_dir = ossl_safe_getenv("OPENSSL_MODULES");
  923|      0|                if (load_dir == NULL)
  ------------------
  |  Branch (923:21): [True: 0, False: 0]
  ------------------
  924|      0|                    load_dir = ossl_get_modulesdir();
  925|      0|            }
  926|       |
  927|      0|            DSO_ctrl(prov->module, DSO_CTRL_SET_FLAGS,
  ------------------
  |  |   19|      0|# define DSO_CTRL_SET_FLAGS      2
  ------------------
  928|      0|                     DSO_FLAG_NAME_TRANSLATION_EXT_ONLY, NULL);
  ------------------
  |  |   41|      0|# define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY      0x02
  ------------------
  929|       |
  930|      0|            module_path = prov->path;
  931|      0|            if (module_path == NULL)
  ------------------
  |  Branch (931:17): [True: 0, False: 0]
  ------------------
  932|      0|                module_path = allocated_path =
  933|      0|                    DSO_convert_filename(prov->module, prov->name);
  934|      0|            if (module_path != NULL)
  ------------------
  |  Branch (934:17): [True: 0, False: 0]
  ------------------
  935|      0|                merged_path = DSO_merge(prov->module, module_path, load_dir);
  936|       |
  937|      0|            if (merged_path == NULL
  ------------------
  |  Branch (937:17): [True: 0, False: 0]
  ------------------
  938|      0|                || (DSO_load(prov->module, merged_path, NULL, 0)) == NULL) {
  ------------------
  |  Branch (938:20): [True: 0, False: 0]
  ------------------
  939|      0|                DSO_free(prov->module);
  940|      0|                prov->module = NULL;
  941|      0|            }
  942|       |
  943|      0|            OPENSSL_free(merged_path);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  944|      0|            OPENSSL_free(allocated_path);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  945|      0|            OPENSSL_free(allocated_load_dir);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  946|      0|        }
  947|       |
  948|      0|        if (prov->module == NULL) {
  ------------------
  |  Branch (948:13): [True: 0, False: 0]
  ------------------
  949|       |            /* DSO has already recorded errors, this is just a tracepoint */
  950|      0|            ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  ------------------
  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  405|      0|     ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |   85|      0|# define ERR_LIB_CRYPTO          15
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |  335|      0|# define ERR_R_DSO_LIB          (ERR_LIB_DSO/* 37 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   98|      0|# define ERR_LIB_DSO             37
  |  |  ------------------
  |  |               # define ERR_R_DSO_LIB          (ERR_LIB_DSO/* 37 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  237|      0|# define ERR_RFLAG_COMMON               (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  228|      0|# define ERR_RFLAGS_OFFSET              18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  951|      0|                           "name=%s", prov->name);
  952|      0|            goto end;
  953|      0|        }
  954|       |
  955|      0|        prov->init_function = (OSSL_provider_init_fn *)
  956|      0|            DSO_bind_func(prov->module, "OSSL_provider_init");
  957|      0|#endif
  958|      0|    }
  959|       |
  960|       |    /* Check for and call the initialise function for the provider. */
  961|      2|    if (prov->init_function == NULL) {
  ------------------
  |  Branch (961:9): [True: 0, False: 2]
  ------------------
  962|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_UNSUPPORTED,
  ------------------
  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  ------------------
  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  405|      0|     ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_UNSUPPORTED,
  ------------------
  |  |   85|      0|# define ERR_LIB_CRYPTO          15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_UNSUPPORTED,
  ------------------
  |  |  363|      0|# define ERR_R_UNSUPPORTED                       (268|ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  237|      0|# define ERR_RFLAG_COMMON               (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  228|      0|# define ERR_RFLAGS_OFFSET              18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  963|      0|                       "name=%s, provider has no provider init function",
  964|      0|                       prov->name);
  965|      0|        goto end;
  966|      0|    }
  967|       |
  968|      2|    if (!prov->init_function((OSSL_CORE_HANDLE *)prov, core_dispatch,
  ------------------
  |  Branch (968:9): [True: 0, False: 2]
  ------------------
  969|      2|                             &provider_dispatch, &tmp_provctx)) {
  970|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
  ------------------
  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  ------------------
  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  405|      0|     ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
  ------------------
  |  |   85|      0|# define ERR_LIB_CRYPTO          15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
  ------------------
  |  |  356|      0|# define ERR_R_INIT_FAIL                         (261|ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  350|      0|# define ERR_R_FATAL                             (ERR_RFLAG_FATAL|ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  236|      0|# define ERR_RFLAG_FATAL                (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  228|      0|# define ERR_RFLAGS_OFFSET              18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               # define ERR_R_FATAL                             (ERR_RFLAG_FATAL|ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|# define ERR_RFLAG_COMMON               (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  228|      0|# define ERR_RFLAGS_OFFSET              18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  971|      0|                       "name=%s", prov->name);
  972|      0|        goto end;
  973|      0|    }
  974|      2|    prov->provctx = tmp_provctx;
  975|      2|    prov->dispatch = provider_dispatch;
  976|       |
  977|      2|    if (provider_dispatch != NULL) {
  ------------------
  |  Branch (977:9): [True: 2, False: 0]
  ------------------
  978|      6|        for (; provider_dispatch->function_id != 0; provider_dispatch++) {
  ------------------
  |  Branch (978:16): [True: 4, False: 2]
  ------------------
  979|      4|            switch (provider_dispatch->function_id) {
  ------------------
  |  Branch (979:21): [True: 0, False: 4]
  ------------------
  980|      2|            case OSSL_FUNC_PROVIDER_TEARDOWN:
  ------------------
  |  |  250|      2|# define OSSL_FUNC_PROVIDER_TEARDOWN           1024
  ------------------
  |  Branch (980:13): [True: 2, False: 2]
  ------------------
  981|      2|                prov->teardown =
  982|      2|                    OSSL_FUNC_provider_teardown(provider_dispatch);
  983|      2|                break;
  984|      0|            case OSSL_FUNC_PROVIDER_GETTABLE_PARAMS:
  ------------------
  |  |  252|      0|# define OSSL_FUNC_PROVIDER_GETTABLE_PARAMS    1025
  ------------------
  |  Branch (984:13): [True: 0, False: 4]
  ------------------
  985|      0|                prov->gettable_params =
  986|      0|                    OSSL_FUNC_provider_gettable_params(provider_dispatch);
  987|      0|                break;
  988|      0|            case OSSL_FUNC_PROVIDER_GET_PARAMS:
  ------------------
  |  |  255|      0|# define OSSL_FUNC_PROVIDER_GET_PARAMS         1026
  ------------------
  |  Branch (988:13): [True: 0, False: 4]
  ------------------
  989|      0|                prov->get_params =
  990|      0|                    OSSL_FUNC_provider_get_params(provider_dispatch);
  991|      0|                break;
  992|      0|            case OSSL_FUNC_PROVIDER_SELF_TEST:
  ------------------
  |  |  270|      0|# define OSSL_FUNC_PROVIDER_SELF_TEST          1031
  ------------------
  |  Branch (992:13): [True: 0, False: 4]
  ------------------
  993|      0|                prov->self_test =
  994|      0|                    OSSL_FUNC_provider_self_test(provider_dispatch);
  995|      0|                break;
  996|      0|            case OSSL_FUNC_PROVIDER_GET_CAPABILITIES:
  ------------------
  |  |  267|      0|# define OSSL_FUNC_PROVIDER_GET_CAPABILITIES   1030
  ------------------
  |  Branch (996:13): [True: 0, False: 4]
  ------------------
  997|      0|                prov->get_capabilities =
  998|      0|                    OSSL_FUNC_provider_get_capabilities(provider_dispatch);
  999|      0|                break;
 1000|      2|            case OSSL_FUNC_PROVIDER_QUERY_OPERATION:
  ------------------
  |  |  258|      2|# define OSSL_FUNC_PROVIDER_QUERY_OPERATION    1027
  ------------------
  |  Branch (1000:13): [True: 2, False: 2]
  ------------------
 1001|      2|                prov->query_operation =
 1002|      2|                    OSSL_FUNC_provider_query_operation(provider_dispatch);
 1003|      2|                break;
 1004|      0|            case OSSL_FUNC_PROVIDER_UNQUERY_OPERATION:
  ------------------
  |  |  261|      0|# define OSSL_FUNC_PROVIDER_UNQUERY_OPERATION  1028
  ------------------
  |  Branch (1004:13): [True: 0, False: 4]
  ------------------
 1005|      0|                prov->unquery_operation =
 1006|      0|                    OSSL_FUNC_provider_unquery_operation(provider_dispatch);
 1007|      0|                break;
 1008|      0|#ifndef OPENSSL_NO_ERR
 1009|      0|# ifndef FIPS_MODULE
 1010|      0|            case OSSL_FUNC_PROVIDER_GET_REASON_STRINGS:
  ------------------
  |  |  264|      0|# define OSSL_FUNC_PROVIDER_GET_REASON_STRINGS 1029
  ------------------
  |  Branch (1010:13): [True: 0, False: 4]
  ------------------
 1011|      0|                p_get_reason_strings =
 1012|      0|                    OSSL_FUNC_provider_get_reason_strings(provider_dispatch);
 1013|      0|                break;
 1014|      4|# endif
 1015|      4|#endif
 1016|      4|            }
 1017|      4|        }
 1018|      2|    }
 1019|       |
 1020|      2|#ifndef OPENSSL_NO_ERR
 1021|      2|# ifndef FIPS_MODULE
 1022|      2|    if (p_get_reason_strings != NULL) {
  ------------------
  |  Branch (1022:9): [True: 0, False: 2]
  ------------------
 1023|      0|        const OSSL_ITEM *reasonstrings = p_get_reason_strings(prov->provctx);
 1024|      0|        size_t cnt, cnt2;
 1025|       |
 1026|       |        /*
 1027|       |         * ERR_load_strings() handles ERR_STRING_DATA rather than OSSL_ITEM,
 1028|       |         * although they are essentially the same type.
 1029|       |         * Furthermore, ERR_load_strings() patches the array's error number
 1030|       |         * with the error library number, so we need to make a copy of that
 1031|       |         * array either way.
 1032|       |         */
 1033|      0|        cnt = 0;
 1034|      0|        while (reasonstrings[cnt].id != 0) {
  ------------------
  |  Branch (1034:16): [True: 0, False: 0]
  ------------------
 1035|      0|            if (ERR_GET_LIB(reasonstrings[cnt].id) != 0)
  ------------------
  |  Branch (1035:17): [True: 0, False: 0]
  ------------------
 1036|      0|                goto end;
 1037|      0|            cnt++;
 1038|      0|        }
 1039|      0|        cnt++;                   /* One for the terminating item */
 1040|       |
 1041|       |        /* Allocate one extra item for the "library" name */
 1042|      0|        prov->error_strings =
 1043|      0|            OPENSSL_zalloc(sizeof(ERR_STRING_DATA) * (cnt + 1));
  ------------------
  |  |  104|      0|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1044|      0|        if (prov->error_strings == NULL)
  ------------------
  |  Branch (1044:13): [True: 0, False: 0]
  ------------------
 1045|      0|            goto end;
 1046|       |
 1047|       |        /*
 1048|       |         * Set the "library" name.
 1049|       |         */
 1050|      0|        prov->error_strings[0].error = ERR_PACK(prov->error_lib, 0, 0);
  ------------------
  |  |  279|      0|    ( (((unsigned long)(lib)    & ERR_LIB_MASK   ) << ERR_LIB_OFFSET) | \
  |  |  ------------------
  |  |  |  |  227|      0|# define ERR_LIB_MASK                   0xFF
  |  |  ------------------
  |  |                   ( (((unsigned long)(lib)    & ERR_LIB_MASK   ) << ERR_LIB_OFFSET) | \
  |  |  ------------------
  |  |  |  |  226|      0|# define ERR_LIB_OFFSET                 23L
  |  |  ------------------
  |  |  280|      0|      (((unsigned long)(reason) & ERR_REASON_MASK)) )
  |  |  ------------------
  |  |  |  |  230|      0|# define ERR_REASON_MASK                0X7FFFFF
  |  |  ------------------
  ------------------
 1051|      0|        prov->error_strings[0].string = prov->name;
 1052|       |        /*
 1053|       |         * Copy reasonstrings item 0..cnt-1 to prov->error_trings positions
 1054|       |         * 1..cnt.
 1055|       |         */
 1056|      0|        for (cnt2 = 1; cnt2 <= cnt; cnt2++) {
  ------------------
  |  Branch (1056:24): [True: 0, False: 0]
  ------------------
 1057|      0|            prov->error_strings[cnt2].error = (int)reasonstrings[cnt2-1].id;
 1058|      0|            prov->error_strings[cnt2].string = reasonstrings[cnt2-1].ptr;
 1059|      0|        }
 1060|       |
 1061|      0|        ERR_load_strings(prov->error_lib, prov->error_strings);
 1062|      0|    }
 1063|      2|# endif
 1064|      2|#endif
 1065|       |
 1066|       |    /* With this flag set, this provider has become fully "loaded". */
 1067|      2|    prov->flag_initialized = 1;
 1068|      2|    ok = 1;
 1069|       |
 1070|      2| end:
 1071|      2|    return ok;
 1072|      2|}
provider_core.c:provider_flush_store_cache:
 1229|      2|{
 1230|      2|    struct provider_store_st *store;
 1231|      2|    int freeing;
 1232|       |
 1233|      2|    if ((store = get_provider_store(prov->libctx)) == NULL)
  ------------------
  |  Branch (1233:9): [True: 0, False: 2]
  ------------------
 1234|      0|        return 0;
 1235|       |
 1236|      2|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1236:9): [True: 0, False: 2]
  ------------------
 1237|      0|        return 0;
 1238|      2|    freeing = store->freeing;
 1239|      2|    CRYPTO_THREAD_unlock(store->lock);
 1240|       |
 1241|      2|    if (!freeing) {
  ------------------
  |  Branch (1241:9): [True: 2, False: 0]
  ------------------
 1242|      2|        int acc
 1243|      2|            = evp_method_store_cache_flush(prov->libctx)
 1244|      2|#ifndef FIPS_MODULE
 1245|      2|            + ossl_encoder_store_cache_flush(prov->libctx)
 1246|      2|            + ossl_decoder_store_cache_flush(prov->libctx)
 1247|      2|            + ossl_store_loader_store_cache_flush(prov->libctx)
 1248|      2|#endif
 1249|      2|            ;
 1250|       |
 1251|      2|#ifndef FIPS_MODULE
 1252|      2|        return acc == 4;
 1253|       |#else
 1254|       |        return acc == 1;
 1255|       |#endif
 1256|      2|    }
 1257|      0|    return 1;
 1258|      2|}
provider_core.c:provider_deactivate:
 1082|      2|{
 1083|      2|    int count;
 1084|      2|    struct provider_store_st *store;
 1085|      2|#ifndef FIPS_MODULE
 1086|      2|    int freeparent = 0;
 1087|      2|#endif
 1088|      2|    int lock = 1;
 1089|       |
 1090|      2|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|      2|#  define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: "#x, \
  |  |   53|      2|                                         __FILE__, __LINE__)
  ------------------
  |  Branch (1090:9): [True: 0, False: 2]
  ------------------
 1091|      0|        return -1;
 1092|       |
 1093|       |    /*
 1094|       |     * No need to lock if we've got no store because we've not been shared with
 1095|       |     * other threads.
 1096|       |     */
 1097|      2|    store = get_provider_store(prov->libctx);
 1098|      2|    if (store == NULL)
  ------------------
  |  Branch (1098:9): [True: 0, False: 2]
  ------------------
 1099|      0|        lock = 0;
 1100|       |
 1101|      2|    if (lock && !CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1101:9): [True: 2, False: 0]
  |  Branch (1101:17): [True: 0, False: 2]
  ------------------
 1102|      0|        return -1;
 1103|      2|    if (lock && !CRYPTO_THREAD_write_lock(prov->flag_lock)) {
  ------------------
  |  Branch (1103:9): [True: 2, False: 0]
  |  Branch (1103:17): [True: 0, False: 2]
  ------------------
 1104|      0|        CRYPTO_THREAD_unlock(store->lock);
 1105|      0|        return -1;
 1106|      0|    }
 1107|       |
 1108|      2|    CRYPTO_atomic_add(&prov->activatecnt, -1, &count, prov->activatecnt_lock);
 1109|      2|#ifndef FIPS_MODULE
 1110|      2|    if (count >= 1 && prov->ischild && upcalls) {
  ------------------
  |  Branch (1110:9): [True: 0, False: 2]
  |  Branch (1110:23): [True: 0, False: 0]
  |  Branch (1110:40): [True: 0, False: 0]
  ------------------
 1111|       |        /*
 1112|       |         * We have had a direct activation in this child libctx so we need to
 1113|       |         * now down the ref count in the parent provider. We do the actual down
 1114|       |         * ref outside of the flag_lock, since it could involve getting other
 1115|       |         * locks.
 1116|       |         */
 1117|      0|        freeparent = 1;
 1118|      0|    }
 1119|      2|#endif
 1120|       |
 1121|      2|    if (count < 1)
  ------------------
  |  Branch (1121:9): [True: 2, False: 0]
  ------------------
 1122|      2|        prov->flag_activated = 0;
 1123|      0|#ifndef FIPS_MODULE
 1124|      0|    else
 1125|      0|        removechildren = 0;
 1126|      2|#endif
 1127|       |
 1128|      2|#ifndef FIPS_MODULE
 1129|      2|    if (removechildren && store != NULL) {
  ------------------
  |  Branch (1129:9): [True: 2, False: 0]
  |  Branch (1129:27): [True: 2, False: 0]
  ------------------
 1130|      2|        int i, max = sk_OSSL_PROVIDER_CHILD_CB_num(store->child_cbs);
 1131|      2|        OSSL_PROVIDER_CHILD_CB *child_cb;
 1132|       |
 1133|      2|        for (i = 0; i < max; i++) {
  ------------------
  |  Branch (1133:21): [True: 0, False: 2]
  ------------------
 1134|      0|            child_cb = sk_OSSL_PROVIDER_CHILD_CB_value(store->child_cbs, i);
 1135|      0|            child_cb->remove_cb((OSSL_CORE_HANDLE *)prov, child_cb->cbdata);
 1136|      0|        }
 1137|      2|    }
 1138|      2|#endif
 1139|      2|    if (lock) {
  ------------------
  |  Branch (1139:9): [True: 2, False: 0]
  ------------------
 1140|      2|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1141|      2|        CRYPTO_THREAD_unlock(store->lock);
 1142|       |        /*
 1143|       |         * This can be done outside the lock. We tolerate other threads getting
 1144|       |         * the wrong result briefly when creating OSSL_DECODER_CTXs.
 1145|       |         */
 1146|      2|#ifndef FIPS_MODULE
 1147|      2|        if (count < 1)
  ------------------
  |  Branch (1147:13): [True: 2, False: 0]
  ------------------
 1148|      2|            ossl_decoder_cache_flush(prov->libctx);
 1149|      2|#endif
 1150|      2|    }
 1151|      2|#ifndef FIPS_MODULE
 1152|      2|    if (freeparent)
  ------------------
  |  Branch (1152:9): [True: 0, False: 2]
  ------------------
 1153|      0|        ossl_provider_free_parent(prov, 1);
 1154|      2|#endif
 1155|       |
 1156|       |    /* We don't deinit here, that's done in ossl_provider_free() */
 1157|      2|    return count;
 1158|      2|}
provider_core.c:provider_remove_store_methods:
 1261|      2|{
 1262|      2|    struct provider_store_st *store;
 1263|      2|    int freeing;
 1264|       |
 1265|      2|    if ((store = get_provider_store(prov->libctx)) == NULL)
  ------------------
  |  Branch (1265:9): [True: 0, False: 2]
  ------------------
 1266|      0|        return 0;
 1267|       |
 1268|      2|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1268:9): [True: 0, False: 2]
  ------------------
 1269|      0|        return 0;
 1270|      2|    freeing = store->freeing;
 1271|      2|    CRYPTO_THREAD_unlock(store->lock);
 1272|       |
 1273|      2|    if (!freeing) {
  ------------------
  |  Branch (1273:9): [True: 0, False: 2]
  ------------------
 1274|      0|        int acc;
 1275|       |
 1276|      0|        if (!CRYPTO_THREAD_write_lock(prov->opbits_lock))
  ------------------
  |  Branch (1276:13): [True: 0, False: 0]
  ------------------
 1277|      0|            return 0;
 1278|      0|        OPENSSL_free(prov->operation_bits);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1279|      0|        prov->operation_bits = NULL;
 1280|      0|        prov->operation_bits_sz = 0;
 1281|      0|        CRYPTO_THREAD_unlock(prov->opbits_lock);
 1282|       |
 1283|      0|        acc = evp_method_store_remove_all_provided(prov)
 1284|      0|#ifndef FIPS_MODULE
 1285|      0|            + ossl_encoder_store_remove_all_provided(prov)
 1286|      0|            + ossl_decoder_store_remove_all_provided(prov)
 1287|      0|            + ossl_store_loader_store_remove_all_provided(prov)
 1288|      0|#endif
 1289|      0|            ;
 1290|       |
 1291|      0|#ifndef FIPS_MODULE
 1292|      0|        return acc == 4;
 1293|       |#else
 1294|       |        return acc == 1;
 1295|       |#endif
 1296|      0|    }
 1297|      2|    return 1;
 1298|      2|}

ossl_err_load_RAND_strings:
  103|      2|{
  104|      2|#ifndef OPENSSL_NO_ERR
  105|      2|    if (ERR_reason_error_string(RAND_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (105:9): [True: 2, False: 0]
  ------------------
  106|      2|        ERR_load_strings_const(RAND_str_reasons);
  107|      2|#endif
  108|      2|    return 1;
  109|      2|}

ossl_rand_cleanup_int:
   81|      2|{
   82|      2|# ifndef OPENSSL_NO_DEPRECATED_3_0
   83|      2|    const RAND_METHOD *meth = default_RAND_meth;
   84|       |
   85|      2|    if (!rand_inited)
  ------------------
  |  Branch (85:9): [True: 2, False: 0]
  ------------------
   86|      2|        return;
   87|       |
   88|      0|    if (meth != NULL && meth->cleanup != NULL)
  ------------------
  |  Branch (88:9): [True: 0, False: 0]
  |  Branch (88:25): [True: 0, False: 0]
  ------------------
   89|      0|        meth->cleanup();
   90|      0|    RAND_set_rand_method(NULL);
   91|      0|# endif
   92|      0|    ossl_rand_pool_cleanup();
   93|      0|# ifndef OPENSSL_NO_ENGINE
   94|      0|    CRYPTO_THREAD_lock_free(rand_engine_lock);
   95|      0|    rand_engine_lock = NULL;
   96|      0|# endif
   97|      0|# ifndef OPENSSL_NO_DEPRECATED_3_0
   98|      0|    CRYPTO_THREAD_lock_free(rand_meth_lock);
   99|      0|    rand_meth_lock = NULL;
  100|      0|# endif
  101|      0|    ossl_release_default_drbg_ctx();
  102|      0|    rand_inited = 0;
  103|      0|}
ossl_rand_ctx_new:
  454|      4|{
  455|      4|    RAND_GLOBAL *dgbl = OPENSSL_zalloc(sizeof(*dgbl));
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  456|       |
  457|      4|    if (dgbl == NULL)
  ------------------
  |  Branch (457:9): [True: 0, False: 4]
  ------------------
  458|      0|        return NULL;
  459|       |
  460|      4|#ifndef FIPS_MODULE
  461|       |    /*
  462|       |     * We need to ensure that base libcrypto thread handling has been
  463|       |     * initialised.
  464|       |     */
  465|      4|     OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL);
  ------------------
  |  |   31|      4|# define OPENSSL_INIT_BASE_ONLY              0x00040000L
  ------------------
  466|      4|#endif
  467|       |
  468|      4|    dgbl->lock = CRYPTO_THREAD_lock_new();
  469|      4|    if (dgbl->lock == NULL)
  ------------------
  |  Branch (469:9): [True: 0, False: 4]
  ------------------
  470|      0|        goto err1;
  471|       |
  472|      4|    if (!CRYPTO_THREAD_init_local(&dgbl->private, NULL))
  ------------------
  |  Branch (472:9): [True: 0, False: 4]
  ------------------
  473|      0|        goto err1;
  474|       |
  475|      4|    if (!CRYPTO_THREAD_init_local(&dgbl->public, NULL))
  ------------------
  |  Branch (475:9): [True: 0, False: 4]
  ------------------
  476|      0|        goto err2;
  477|       |
  478|      4|    return dgbl;
  479|       |
  480|      0| err2:
  481|      0|    CRYPTO_THREAD_cleanup_local(&dgbl->private);
  482|      0| err1:
  483|      0|    CRYPTO_THREAD_lock_free(dgbl->lock);
  484|      0|    OPENSSL_free(dgbl);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  485|      0|    return NULL;
  486|      0|}
ossl_rand_ctx_free:
  489|      2|{
  490|      2|    RAND_GLOBAL *dgbl = vdgbl;
  491|       |
  492|      2|    if (dgbl == NULL)
  ------------------
  |  Branch (492:9): [True: 0, False: 2]
  ------------------
  493|      0|        return;
  494|       |
  495|      2|    CRYPTO_THREAD_lock_free(dgbl->lock);
  496|      2|    CRYPTO_THREAD_cleanup_local(&dgbl->private);
  497|      2|    CRYPTO_THREAD_cleanup_local(&dgbl->public);
  498|      2|    EVP_RAND_CTX_free(dgbl->primary);
  499|      2|    EVP_RAND_CTX_free(dgbl->seed);
  500|      2|    OPENSSL_free(dgbl->rng_name);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  501|      2|    OPENSSL_free(dgbl->rng_cipher);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  502|      2|    OPENSSL_free(dgbl->rng_digest);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  503|      2|    OPENSSL_free(dgbl->rng_propq);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  504|      2|    OPENSSL_free(dgbl->seed_name);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  505|      2|    OPENSSL_free(dgbl->seed_propq);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  506|       |
  507|      2|    OPENSSL_free(dgbl);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  508|      2|}
RAND_set_DRBG_type:
  939|      2|{
  940|      2|    RAND_GLOBAL *dgbl = rand_get_global(ctx);
  941|       |
  942|      2|    if (dgbl == NULL)
  ------------------
  |  Branch (942:9): [True: 0, False: 2]
  ------------------
  943|      0|        return 0;
  944|      2|    if (dgbl->primary != NULL) {
  ------------------
  |  Branch (944:9): [True: 0, False: 2]
  ------------------
  945|      0|        ERR_raise(ERR_LIB_CRYPTO, RAND_R_ALREADY_INSTANTIATED);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  946|      0|        return 0;
  947|      0|    }
  948|      2|    return random_set_string(&dgbl->rng_name, drbg)
  ------------------
  |  Branch (948:12): [True: 2, False: 0]
  ------------------
  949|      2|        && random_set_string(&dgbl->rng_propq, propq)
  ------------------
  |  Branch (949:12): [True: 2, False: 0]
  ------------------
  950|      2|        && random_set_string(&dgbl->rng_cipher, cipher)
  ------------------
  |  Branch (950:12): [True: 2, False: 0]
  ------------------
  951|      2|        && random_set_string(&dgbl->rng_digest, digest);
  ------------------
  |  Branch (951:12): [True: 2, False: 0]
  ------------------
  952|      2|}
rand_lib.c:rand_get_global:
  511|      2|{
  512|      2|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DRBG_INDEX);
  ------------------
  |  |  101|      2|# define OSSL_LIB_CTX_DRBG_INDEX                     5
  ------------------
  513|      2|}
rand_lib.c:random_set_string:
  859|      8|{
  860|      8|    char *d = NULL;
  861|       |
  862|      8|    if (s != NULL) {
  ------------------
  |  Branch (862:9): [True: 2, False: 6]
  ------------------
  863|      2|        d = OPENSSL_strdup(s);
  ------------------
  |  |  119|      2|        CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  864|      2|        if (d == NULL)
  ------------------
  |  Branch (864:13): [True: 0, False: 2]
  ------------------
  865|      0|            return 0;
  866|      2|    }
  867|      8|    OPENSSL_free(*p);
  ------------------
  |  |  115|      8|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      8|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      8|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  868|      8|    *p = d;
  869|      8|    return 1;
  870|      8|}

ossl_err_load_RSA_strings:
  160|      2|{
  161|      2|#ifndef OPENSSL_NO_ERR
  162|      2|    if (ERR_reason_error_string(RSA_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (162:9): [True: 2, False: 0]
  ------------------
  163|      2|        ERR_load_strings_const(RSA_str_reasons);
  164|      2|#endif
  165|      2|    return 1;
  166|      2|}

ossl_self_test_set_callback_new:
   35|      4|{
   36|      4|    SELF_TEST_CB *stcb;
   37|       |
   38|      4|    stcb = OPENSSL_zalloc(sizeof(*stcb));
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|      4|    return stcb;
   40|      4|}
ossl_self_test_set_callback_free:
   43|      2|{
   44|      2|    OPENSSL_free(stcb);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|      2|}

EVP_sm3:
   29|      2|{
   30|      2|    return &sm3_md;
   31|      2|}

ossl_sa_new:
   59|     16|{
   60|     16|    OPENSSL_SA *res = OPENSSL_zalloc(sizeof(*res));
  ------------------
  |  |  104|     16|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     16|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     16|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|       |
   62|     16|    return res;
   63|     16|}
ossl_sa_free:
  111|      8|{
  112|      8|    if (sa != NULL) {
  ------------------
  |  Branch (112:9): [True: 8, False: 0]
  ------------------
  113|      8|        sa_doall(sa, &sa_free_node, NULL, NULL);
  114|      8|        OPENSSL_free(sa);
  ------------------
  |  |  115|      8|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      8|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      8|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  115|      8|    }
  116|      8|}
ossl_sa_doall:
  135|      8|{
  136|      8|    struct trampoline_st tramp;
  137|       |
  138|      8|    tramp.func = leaf;
  139|      8|    if (sa != NULL)
  ------------------
  |  Branch (139:9): [True: 8, False: 0]
  ------------------
  140|      8|        sa_doall(sa, NULL, &trampoline, &tramp);
  141|      8|}
ossl_sa_doall_arg:
  146|      8|{
  147|      8|    if (sa != NULL)
  ------------------
  |  Branch (147:9): [True: 8, False: 0]
  ------------------
  148|      8|        sa_doall(sa, NULL, leaf, arg);
  149|      8|}
sparse_array.c:sa_doall:
   67|     24|{
   68|     24|    int i[SA_BLOCK_MAX_LEVELS];
   69|     24|    void *nodes[SA_BLOCK_MAX_LEVELS];
   70|     24|    ossl_uintmax_t idx = 0;
   71|     24|    int l = 0;
   72|       |
   73|     24|    i[0] = 0;
   74|     24|    nodes[0] = sa->nodes;
   75|    432|    while (l >= 0) {
  ------------------
  |  Branch (75:12): [True: 408, False: 24]
  ------------------
   76|    408|        const int n = i[l];
   77|    408|        void ** const p = nodes[l];
   78|       |
   79|    408|        if (n >= SA_BLOCK_MAX) {
  ------------------
  |  |   45|    408|#define SA_BLOCK_MAX            (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  ------------------
  |  |  |  |   34|    408|# define OPENSSL_SA_BLOCK_BITS           4
  |  |  ------------------
  ------------------
  |  Branch (79:13): [True: 24, False: 384]
  ------------------
   80|     24|            if (p != NULL && node != NULL)
  ------------------
  |  Branch (80:17): [True: 0, False: 24]
  |  Branch (80:30): [True: 0, False: 0]
  ------------------
   81|      0|                (*node)(p);
   82|     24|            l--;
   83|     24|            idx >>= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|     24|# define OPENSSL_SA_BLOCK_BITS           4
  ------------------
   84|    384|        } else {
   85|    384|            i[l] = n + 1;
   86|    384|            if (p != NULL && p[n] != NULL) {
  ------------------
  |  Branch (86:17): [True: 0, False: 384]
  |  Branch (86:30): [True: 0, False: 0]
  ------------------
   87|      0|                idx = (idx & ~SA_BLOCK_MASK) | n;
  ------------------
  |  |   46|      0|#define SA_BLOCK_MASK           (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|      0|#define SA_BLOCK_MAX            (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|      0|# define OPENSSL_SA_BLOCK_BITS           4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   88|      0|                if (l < sa->levels - 1) {
  ------------------
  |  Branch (88:21): [True: 0, False: 0]
  ------------------
   89|      0|                    i[++l] = 0;
   90|      0|                    nodes[l] = p[n];
   91|      0|                    idx <<= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|      0|# define OPENSSL_SA_BLOCK_BITS           4
  ------------------
   92|      0|                } else if (leaf != NULL) {
  ------------------
  |  Branch (92:28): [True: 0, False: 0]
  ------------------
   93|      0|                    (*leaf)(idx, p[n], arg);
   94|      0|                }
   95|      0|            }
   96|    384|        }
   97|    408|    }
   98|     24|}

OPENSSL_sk_dup:
   48|      2|{
   49|      2|    OPENSSL_STACK *ret;
   50|       |
   51|      2|    if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  102|      2|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (51:9): [True: 0, False: 2]
  ------------------
   52|      0|        goto err;
   53|       |
   54|      2|    if (sk == NULL) {
  ------------------
  |  Branch (54:9): [True: 2, False: 0]
  ------------------
   55|      2|        ret->num = 0;
   56|      2|        ret->sorted = 0;
   57|      2|        ret->comp = NULL;
   58|      2|    } else {
   59|       |        /* direct structure assignment */
   60|      0|        *ret = *sk;
   61|      0|    }
   62|       |
   63|      2|    if (sk == NULL || sk->num == 0) {
  ------------------
  |  Branch (63:9): [True: 2, False: 0]
  |  Branch (63:23): [True: 0, False: 0]
  ------------------
   64|       |        /* postpone |ret->data| allocation */
   65|      2|        ret->data = NULL;
   66|      2|        ret->num_alloc = 0;
   67|      2|        return ret;
   68|      2|    }
   69|       |
   70|       |    /* duplicate |sk->data| content */
   71|      0|    ret->data = OPENSSL_malloc(sizeof(*ret->data) * sk->num_alloc);
  ------------------
  |  |  102|      0|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   72|      0|    if (ret->data == NULL)
  ------------------
  |  Branch (72:9): [True: 0, False: 0]
  ------------------
   73|      0|        goto err;
   74|      0|    memcpy(ret->data, sk->data, sizeof(void *) * sk->num);
   75|      0|    return ret;
   76|       |
   77|      0| err:
   78|      0|    OPENSSL_sk_free(ret);
   79|      0|    return NULL;
   80|      0|}
OPENSSL_sk_deep_copy:
   85|      2|{
   86|      2|    OPENSSL_STACK *ret;
   87|      2|    int i;
   88|       |
   89|      2|    if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  102|      2|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (89:9): [True: 0, False: 2]
  ------------------
   90|      0|        goto err;
   91|       |
   92|      2|    if (sk == NULL) {
  ------------------
  |  Branch (92:9): [True: 2, False: 0]
  ------------------
   93|      2|        ret->num = 0;
   94|      2|        ret->sorted = 0;
   95|      2|        ret->comp = NULL;
   96|      2|    } else {
   97|       |        /* direct structure assignment */
   98|      0|        *ret = *sk;
   99|      0|    }
  100|       |
  101|      2|    if (sk == NULL || sk->num == 0) {
  ------------------
  |  Branch (101:9): [True: 2, False: 0]
  |  Branch (101:23): [True: 0, False: 0]
  ------------------
  102|       |        /* postpone |ret| data allocation */
  103|      2|        ret->data = NULL;
  104|      2|        ret->num_alloc = 0;
  105|      2|        return ret;
  106|      2|    }
  107|       |
  108|      0|    ret->num_alloc = sk->num > min_nodes ? sk->num : min_nodes;
  ------------------
  |  Branch (108:22): [True: 0, False: 0]
  ------------------
  109|      0|    ret->data = OPENSSL_zalloc(sizeof(*ret->data) * ret->num_alloc);
  ------------------
  |  |  104|      0|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|      0|    if (ret->data == NULL)
  ------------------
  |  Branch (110:9): [True: 0, False: 0]
  ------------------
  111|      0|        goto err;
  112|       |
  113|      0|    for (i = 0; i < ret->num; ++i) {
  ------------------
  |  Branch (113:17): [True: 0, False: 0]
  ------------------
  114|      0|        if (sk->data[i] == NULL)
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|            continue;
  116|      0|        if ((ret->data[i] = copy_func(sk->data[i])) == NULL) {
  ------------------
  |  Branch (116:13): [True: 0, False: 0]
  ------------------
  117|      0|            while (--i >= 0)
  ------------------
  |  Branch (117:20): [True: 0, False: 0]
  ------------------
  118|      0|                if (ret->data[i] != NULL)
  ------------------
  |  Branch (118:21): [True: 0, False: 0]
  ------------------
  119|      0|                    free_func((void *)ret->data[i]);
  120|      0|            goto err;
  121|      0|        }
  122|      0|    }
  123|      0|    return ret;
  124|       |
  125|      0| err:
  126|      0|    OPENSSL_sk_free(ret);
  127|      0|    return NULL;
  128|      0|}
OPENSSL_sk_new_null:
  131|     16|{
  132|     16|    return OPENSSL_sk_new_reserve(NULL, 0);
  133|     16|}
OPENSSL_sk_new:
  136|      8|{
  137|      8|    return OPENSSL_sk_new_reserve(c, 0);
  138|      8|}
OPENSSL_sk_new_reserve:
  227|     24|{
  228|     24|    OPENSSL_STACK *st = OPENSSL_zalloc(sizeof(OPENSSL_STACK));
  ------------------
  |  |  104|     24|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     24|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     24|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  229|       |
  230|     24|    if (st == NULL)
  ------------------
  |  Branch (230:9): [True: 0, False: 24]
  ------------------
  231|      0|        return NULL;
  232|       |
  233|     24|    st->comp = c;
  234|       |
  235|     24|    if (n <= 0)
  ------------------
  |  Branch (235:9): [True: 24, False: 0]
  ------------------
  236|     24|        return st;
  237|       |
  238|      0|    if (!sk_reserve(st, n, 1)) {
  ------------------
  |  Branch (238:9): [True: 0, False: 0]
  ------------------
  239|      0|        OPENSSL_sk_free(st);
  240|      0|        return NULL;
  241|      0|    }
  242|       |
  243|      0|    return st;
  244|      0|}
OPENSSL_sk_insert:
  259|     36|{
  260|     36|    if (st == NULL) {
  ------------------
  |  Branch (260:9): [True: 0, False: 36]
  ------------------
  261|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  262|      0|        return 0;
  263|      0|    }
  264|     36|    if (st->num == max_nodes) {
  ------------------
  |  Branch (264:9): [True: 0, False: 36]
  ------------------
  265|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  266|      0|        return 0;
  267|      0|    }
  268|       |
  269|     36|    if (!sk_reserve(st, 1, 0))
  ------------------
  |  Branch (269:9): [True: 0, False: 36]
  ------------------
  270|      0|        return 0;
  271|       |
  272|     36|    if ((loc >= st->num) || (loc < 0)) {
  ------------------
  |  Branch (272:9): [True: 36, False: 0]
  |  Branch (272:29): [True: 0, False: 0]
  ------------------
  273|     36|        st->data[st->num] = data;
  274|     36|    } else {
  275|      0|        memmove(&st->data[loc + 1], &st->data[loc],
  276|      0|                sizeof(st->data[0]) * (st->num - loc));
  277|      0|        st->data[loc] = data;
  278|      0|    }
  279|     36|    st->num++;
  280|     36|    st->sorted = 0;
  281|     36|    return st->num;
  282|     36|}
OPENSSL_sk_delete:
  310|      2|{
  311|      2|    if (st == NULL || loc < 0 || loc >= st->num)
  ------------------
  |  Branch (311:9): [True: 0, False: 2]
  |  Branch (311:23): [True: 0, False: 2]
  |  Branch (311:34): [True: 0, False: 2]
  ------------------
  312|      0|        return NULL;
  313|       |
  314|      2|    return internal_delete(st, loc);
  315|      2|}
OPENSSL_sk_find:
  383|      4|{
  384|      4|    return internal_find(st, data, OSSL_BSEARCH_FIRST_VALUE_ON_MATCH, NULL);
  ------------------
  |  |  151|      4|# define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH        0x02
  ------------------
  385|      4|}
OPENSSL_sk_push:
  398|     36|{
  399|     36|    if (st == NULL)
  ------------------
  |  Branch (399:9): [True: 0, False: 36]
  ------------------
  400|      0|        return 0;
  401|     36|    return OPENSSL_sk_insert(st, data, st->num);
  402|     36|}
OPENSSL_sk_pop_free:
  432|     54|{
  433|     54|    int i;
  434|       |
  435|     54|    if (st == NULL)
  ------------------
  |  Branch (435:9): [True: 46, False: 8]
  ------------------
  436|     46|        return;
  437|     10|    for (i = 0; i < st->num; i++)
  ------------------
  |  Branch (437:17): [True: 2, False: 8]
  ------------------
  438|      2|        if (st->data[i] != NULL)
  ------------------
  |  Branch (438:13): [True: 2, False: 0]
  ------------------
  439|      2|            func((char *)st->data[i]);
  440|      8|    OPENSSL_sk_free(st);
  441|      8|}
OPENSSL_sk_free:
  444|     26|{
  445|     26|    if (st == NULL)
  ------------------
  |  Branch (445:9): [True: 10, False: 16]
  ------------------
  446|     10|        return;
  447|     16|    OPENSSL_free(st->data);
  ------------------
  |  |  115|     16|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     16|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     16|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  448|     16|    OPENSSL_free(st);
  ------------------
  |  |  115|     16|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     16|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     16|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  449|     16|}
OPENSSL_sk_num:
  452|     14|{
  453|     14|    return st == NULL ? -1 : st->num;
  ------------------
  |  Branch (453:12): [True: 2, False: 12]
  ------------------
  454|     14|}
OPENSSL_sk_value:
  457|      2|{
  458|      2|    if (st == NULL || i < 0 || i >= st->num)
  ------------------
  |  Branch (458:9): [True: 0, False: 2]
  |  Branch (458:23): [True: 0, False: 2]
  |  Branch (458:32): [True: 0, False: 2]
  ------------------
  459|      0|        return NULL;
  460|      2|    return (void *)st->data[i];
  461|      2|}
OPENSSL_sk_sort:
  480|      2|{
  481|      2|    if (st != NULL && !st->sorted && st->comp != NULL) {
  ------------------
  |  Branch (481:9): [True: 2, False: 0]
  |  Branch (481:23): [True: 2, False: 0]
  |  Branch (481:38): [True: 2, False: 0]
  ------------------
  482|      2|        if (st->num > 1)
  ------------------
  |  Branch (482:13): [True: 0, False: 2]
  ------------------
  483|      0|            qsort(st->data, st->num, sizeof(void *), st->comp);
  484|      2|        st->sorted = 1; /* empty or single-element stack is considered sorted */
  485|      2|    }
  486|      2|}
stack.c:sk_reserve:
  178|     36|{
  179|     36|    const void **tmpdata;
  180|     36|    int num_alloc;
  181|       |
  182|       |    /* Check to see the reservation isn't exceeding the hard limit */
  183|     36|    if (n > max_nodes - st->num) {
  ------------------
  |  Branch (183:9): [True: 0, False: 36]
  ------------------
  184|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  185|      0|        return 0;
  186|      0|    }
  187|       |
  188|       |    /* Figure out the new size */
  189|     36|    num_alloc = st->num + n;
  190|     36|    if (num_alloc < min_nodes)
  ------------------
  |  Branch (190:9): [True: 24, False: 12]
  ------------------
  191|     24|        num_alloc = min_nodes;
  192|       |
  193|       |    /* If |st->data| allocation was postponed */
  194|     36|    if (st->data == NULL) {
  ------------------
  |  Branch (194:9): [True: 12, False: 24]
  ------------------
  195|       |        /*
  196|       |         * At this point, |st->num_alloc| and |st->num| are 0;
  197|       |         * so |num_alloc| value is |n| or |min_nodes| if greater than |n|.
  198|       |         */
  199|     12|        if ((st->data = OPENSSL_zalloc(sizeof(void *) * num_alloc)) == NULL)
  ------------------
  |  |  104|     12|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     12|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     12|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (199:13): [True: 0, False: 12]
  ------------------
  200|      0|            return 0;
  201|     12|        st->num_alloc = num_alloc;
  202|     12|        return 1;
  203|     12|    }
  204|       |
  205|     24|    if (!exact) {
  ------------------
  |  Branch (205:9): [True: 24, False: 0]
  ------------------
  206|     24|        if (num_alloc <= st->num_alloc)
  ------------------
  |  Branch (206:13): [True: 20, False: 4]
  ------------------
  207|     20|            return 1;
  208|      4|        num_alloc = compute_growth(num_alloc, st->num_alloc);
  209|      4|        if (num_alloc == 0) {
  ------------------
  |  Branch (209:13): [True: 0, False: 4]
  ------------------
  210|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  211|      0|            return 0;
  212|      0|        }
  213|      4|    } else if (num_alloc == st->num_alloc) {
  ------------------
  |  Branch (213:16): [True: 0, False: 0]
  ------------------
  214|      0|        return 1;
  215|      0|    }
  216|       |
  217|      4|    tmpdata = OPENSSL_realloc((void *)st->data, sizeof(void *) * num_alloc);
  ------------------
  |  |  109|      4|        CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  218|      4|    if (tmpdata == NULL)
  ------------------
  |  Branch (218:9): [True: 0, False: 4]
  ------------------
  219|      0|        return 0;
  220|       |
  221|      4|    st->data = tmpdata;
  222|      4|    st->num_alloc = num_alloc;
  223|      4|    return 1;
  224|      4|}
stack.c:compute_growth:
  160|      4|{
  161|      4|    int err = 0;
  162|       |
  163|      8|    while (current < target) {
  ------------------
  |  Branch (163:12): [True: 4, False: 4]
  ------------------
  164|      4|        if (current >= max_nodes)
  ------------------
  |  Branch (164:13): [True: 0, False: 4]
  ------------------
  165|      0|            return 0;
  166|       |
  167|      4|        current = safe_muldiv_int(current, 8, 5, &err);
  168|      4|        if (err != 0)
  ------------------
  |  Branch (168:13): [True: 0, False: 4]
  ------------------
  169|      0|            return 0;
  170|      4|        if (current >= max_nodes)
  ------------------
  |  Branch (170:13): [True: 0, False: 4]
  ------------------
  171|      0|            current = max_nodes;
  172|      4|    }
  173|      4|    return current;
  174|      4|}
stack.c:internal_delete:
  285|      2|{
  286|      2|    const void *ret = st->data[loc];
  287|       |
  288|      2|    if (loc != st->num - 1)
  ------------------
  |  Branch (288:9): [True: 0, False: 2]
  ------------------
  289|      0|        memmove(&st->data[loc], &st->data[loc + 1],
  290|      0|                sizeof(st->data[0]) * (st->num - loc - 1));
  291|      2|    st->num--;
  292|       |
  293|      2|    return (void *)ret;
  294|      2|}
stack.c:internal_find:
  319|      4|{
  320|      4|    const void *r;
  321|      4|    int i, count = 0;
  322|      4|    int *pnum = pnum_matched;
  323|       |
  324|      4|    if (st == NULL || st->num == 0)
  ------------------
  |  Branch (324:9): [True: 0, False: 4]
  |  Branch (324:23): [True: 4, False: 0]
  ------------------
  325|      4|        return -1;
  326|       |
  327|      0|    if (pnum == NULL)
  ------------------
  |  Branch (327:9): [True: 0, False: 0]
  ------------------
  328|      0|        pnum = &count;
  329|       |
  330|      0|    if (st->comp == NULL) {
  ------------------
  |  Branch (330:9): [True: 0, False: 0]
  ------------------
  331|      0|        for (i = 0; i < st->num; i++)
  ------------------
  |  Branch (331:21): [True: 0, False: 0]
  ------------------
  332|      0|            if (st->data[i] == data) {
  ------------------
  |  Branch (332:17): [True: 0, False: 0]
  ------------------
  333|      0|                *pnum = 1;
  334|      0|                return i;
  335|      0|            }
  336|      0|        *pnum = 0;
  337|      0|        return -1;
  338|      0|    }
  339|       |
  340|      0|    if (data == NULL)
  ------------------
  |  Branch (340:9): [True: 0, False: 0]
  ------------------
  341|      0|        return -1;
  342|       |
  343|      0|    if (!st->sorted) {
  ------------------
  |  Branch (343:9): [True: 0, False: 0]
  ------------------
  344|      0|        int res = -1;
  345|       |
  346|      0|        for (i = 0; i < st->num; i++)
  ------------------
  |  Branch (346:21): [True: 0, False: 0]
  ------------------
  347|      0|            if (st->comp(&data, st->data + i) == 0) {
  ------------------
  |  Branch (347:17): [True: 0, False: 0]
  ------------------
  348|      0|                if (res == -1)
  ------------------
  |  Branch (348:21): [True: 0, False: 0]
  ------------------
  349|      0|                    res = i;
  350|      0|                ++*pnum;
  351|       |                /* Check if only one result is wanted and exit if so */
  352|      0|                if (pnum_matched == NULL)
  ------------------
  |  Branch (352:21): [True: 0, False: 0]
  ------------------
  353|      0|                    return i;
  354|      0|            }
  355|      0|        if (res == -1)
  ------------------
  |  Branch (355:13): [True: 0, False: 0]
  ------------------
  356|      0|            *pnum = 0;
  357|      0|        return res;
  358|      0|    }
  359|       |
  360|      0|    if (pnum_matched != NULL)
  ------------------
  |  Branch (360:9): [True: 0, False: 0]
  ------------------
  361|      0|        ret_val_options |= OSSL_BSEARCH_FIRST_VALUE_ON_MATCH;
  ------------------
  |  |  151|      0|# define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH        0x02
  ------------------
  362|      0|    r = ossl_bsearch(&data, st->data, st->num, sizeof(void *), st->comp,
  363|      0|                     ret_val_options);
  364|       |
  365|      0|    if (pnum_matched != NULL) {
  ------------------
  |  Branch (365:9): [True: 0, False: 0]
  ------------------
  366|      0|        *pnum = 0;
  367|      0|        if (r != NULL) {
  ------------------
  |  Branch (367:13): [True: 0, False: 0]
  ------------------
  368|      0|            const void **p = (const void **)r;
  369|       |
  370|      0|            while (p < st->data + st->num) {
  ------------------
  |  Branch (370:20): [True: 0, False: 0]
  ------------------
  371|      0|                if (st->comp(&data, p) != 0)
  ------------------
  |  Branch (371:21): [True: 0, False: 0]
  ------------------
  372|      0|                    break;
  373|      0|                ++*pnum;
  374|      0|                ++p;
  375|      0|            }
  376|      0|        }
  377|      0|    }
  378|       |
  379|      0|    return r == NULL ? -1 : (int)((const void **)r - st->data);
  ------------------
  |  Branch (379:12): [True: 0, False: 0]
  ------------------
  380|      0|}

ossl_err_load_OSSL_STORE_strings:
   69|      2|{
   70|      2|#ifndef OPENSSL_NO_ERR
   71|      2|    if (ERR_reason_error_string(OSSL_STORE_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (71:9): [True: 2, False: 0]
  ------------------
   72|      2|        ERR_load_strings_const(OSSL_STORE_str_reasons);
   73|      2|#endif
   74|      2|    return 1;
   75|      2|}

ossl_store_cleanup_int:
   14|      2|{
   15|      2|    ossl_store_destroy_loaders_int();
   16|      2|}

ossl_store_loader_store_cache_flush:
  386|      2|{
  387|      2|    OSSL_METHOD_STORE *store = get_loader_store(libctx);
  388|       |
  389|      2|    if (store != NULL)
  ------------------
  |  Branch (389:9): [True: 2, False: 0]
  ------------------
  390|      2|        return ossl_method_store_cache_flush_all(store);
  391|      0|    return 1;
  392|      2|}
store_meth.c:get_loader_store:
  106|      2|{
  107|      2|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX);
  ------------------
  |  |  113|      2|# define OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX      15
  ------------------
  108|      2|}

ossl_store_destroy_loaders_int:
  281|      2|{
  282|      2|    lh_OSSL_STORE_LOADER_free(loader_register);
  283|      2|    loader_register = NULL;
  284|      2|    CRYPTO_THREAD_lock_free(registry_lock);
  285|      2|    registry_lock = NULL;
  286|      2|}

ossl_crypto_mutex_new:
   97|      4|{
   98|      4|    pthread_mutex_t *mutex;
   99|       |
  100|      4|    if ((mutex = OPENSSL_zalloc(sizeof(*mutex))) == NULL)
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (100:9): [True: 0, False: 4]
  ------------------
  101|      0|        return NULL;
  102|      4|    if (pthread_mutex_init(mutex, NULL) != 0) {
  ------------------
  |  Branch (102:9): [True: 0, False: 4]
  ------------------
  103|      0|        OPENSSL_free(mutex);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  104|      0|        return NULL;
  105|      0|    }
  106|      4|    return (CRYPTO_MUTEX *)mutex;
  107|      4|}
ossl_crypto_mutex_free:
  142|      2|{
  143|      2|    pthread_mutex_t **mutex_p;
  144|       |
  145|      2|    if (mutex == NULL)
  ------------------
  |  Branch (145:9): [True: 0, False: 2]
  ------------------
  146|      0|        return;
  147|       |
  148|      2|    mutex_p = (pthread_mutex_t **)mutex;
  149|      2|    if (*mutex_p != NULL)
  ------------------
  |  Branch (149:9): [True: 2, False: 0]
  ------------------
  150|      2|        pthread_mutex_destroy(*mutex_p);
  151|      2|    OPENSSL_free(*mutex_p);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  152|      2|    *mutex = NULL;
  153|      2|}
ossl_crypto_condvar_new:
  156|      4|{
  157|      4|    pthread_cond_t *cv_p;
  158|       |
  159|      4|    if ((cv_p = OPENSSL_zalloc(sizeof(*cv_p))) == NULL)
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (159:9): [True: 0, False: 4]
  ------------------
  160|      0|        return NULL;
  161|      4|    if (pthread_cond_init(cv_p, NULL) != 0) {
  ------------------
  |  Branch (161:9): [True: 0, False: 4]
  ------------------
  162|      0|        OPENSSL_free(cv_p);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  163|      0|        return NULL;
  164|      0|    }
  165|      4|    return (CRYPTO_CONDVAR *) cv_p;
  166|      4|}
ossl_crypto_condvar_free:
  220|      2|{
  221|      2|    pthread_cond_t **cv_p;
  222|       |
  223|      2|    if (cv == NULL)
  ------------------
  |  Branch (223:9): [True: 0, False: 2]
  ------------------
  224|      0|        return;
  225|       |
  226|      2|    cv_p = (pthread_cond_t **)cv;
  227|      2|    if (*cv_p != NULL)
  ------------------
  |  Branch (227:9): [True: 2, False: 0]
  ------------------
  228|      2|        pthread_cond_destroy(*cv_p);
  229|      2|    OPENSSL_free(*cv_p);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  230|      2|    *cv_p = NULL;
  231|      2|}

ossl_threads_ctx_new:
  128|      4|{
  129|      4|    struct openssl_threads_st *t = OPENSSL_zalloc(sizeof(*t));
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  130|       |
  131|      4|    if (t == NULL)
  ------------------
  |  Branch (131:9): [True: 0, False: 4]
  ------------------
  132|      0|        return NULL;
  133|       |
  134|      4|    t->lock = ossl_crypto_mutex_new();
  135|      4|    t->cond_finished = ossl_crypto_condvar_new();
  136|       |
  137|      4|    if (t->lock == NULL || t->cond_finished == NULL)
  ------------------
  |  Branch (137:9): [True: 0, False: 4]
  |  Branch (137:28): [True: 0, False: 4]
  ------------------
  138|      0|        goto fail;
  139|       |
  140|      4|    return t;
  141|       |
  142|      0|fail:
  143|      0|    ossl_threads_ctx_free((void *)t);
  144|      0|    return NULL;
  145|      4|}
ossl_threads_ctx_free:
  148|      2|{
  149|      2|    OSSL_LIB_CTX_THREADS *t = (OSSL_LIB_CTX_THREADS *) vdata;
  150|       |
  151|      2|    if (t == NULL)
  ------------------
  |  Branch (151:9): [True: 0, False: 2]
  ------------------
  152|      0|        return;
  153|       |
  154|      2|    ossl_crypto_mutex_free(&t->lock);
  155|      2|    ossl_crypto_condvar_free(&t->cond_finished);
  156|      2|    OPENSSL_free(t);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  157|      2|}

ossl_rcu_write_lock:
  576|      4|{
  577|      4|    pthread_mutex_lock(&lock->write_lock);
  578|      4|    TSAN_FAKE_UNLOCK(&lock->write_lock);
  579|      4|}
ossl_rcu_write_unlock:
  582|      4|{
  583|      4|    TSAN_FAKE_LOCK(&lock->write_lock);
  584|      4|    pthread_mutex_unlock(&lock->write_lock);
  585|      4|}
ossl_synchronize_rcu:
  588|      6|{
  589|      6|    struct rcu_qp *qp;
  590|      6|    uint64_t count;
  591|      6|    struct rcu_cb_item *cb_items, *tmpcb;
  592|       |
  593|      6|    pthread_mutex_lock(&lock->write_lock);
  594|      6|    cb_items = lock->cb_items;
  595|      6|    lock->cb_items = NULL;
  596|      6|    pthread_mutex_unlock(&lock->write_lock);
  597|       |
  598|      6|    qp = update_qp(lock);
  599|       |
  600|       |    /*
  601|       |     * wait for the reader count to reach zero
  602|       |     * Note the use of __ATOMIC_ACQUIRE here to ensure that any
  603|       |     * prior __ATOMIC_RELEASE write operation in get_hold_current_qp
  604|       |     * is visible prior to our read
  605|       |     */
  606|      6|    do {
  607|      6|        count = ATOMIC_LOAD_N(uint64_t, &qp->users, __ATOMIC_ACQUIRE);
  ------------------
  |  |  122|      6|#   define ATOMIC_LOAD_N(t, p, o) __atomic_load_n(p, o)
  ------------------
  608|      6|    } while (READER_COUNT(count) != 0);
  ------------------
  |  |  281|      6|# define READER_COUNT(x) ((uint32_t)(((uint64_t)(x) >> READER_SHIFT) & \
  |  |  ------------------
  |  |  |  |  273|      6|# define READER_SHIFT 0
  |  |  ------------------
  |  |  282|      6|                                     READER_MASK))
  |  |  ------------------
  |  |  |  |  279|      6|# define READER_MASK     (((uint64_t)1 << READER_SIZE) - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|      6|# define READER_SIZE 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (608:14): [True: 0, False: 6]
  ------------------
  609|       |
  610|       |    /* retire in order */
  611|      6|    pthread_mutex_lock(&lock->prior_lock);
  612|      6|    while (lock->next_to_retire != ID_VAL(count))
  ------------------
  |  |  283|      6|# define ID_VAL(x)       ((uint32_t)(((uint64_t)(x) >> ID_SHIFT) & ID_MASK))
  |  |  ------------------
  |  |  |  |  274|      6|# define ID_SHIFT 32
  |  |  ------------------
  |  |               # define ID_VAL(x)       ((uint32_t)(((uint64_t)(x) >> ID_SHIFT) & ID_MASK))
  |  |  ------------------
  |  |  |  |  280|      6|# define ID_MASK         (((uint64_t)1 << ID_SIZE) - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      6|# define ID_SIZE 32
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (612:12): [True: 0, False: 6]
  ------------------
  613|      0|        pthread_cond_wait(&lock->prior_signal, &lock->prior_lock);
  614|      6|    lock->next_to_retire++;
  615|      6|    pthread_cond_broadcast(&lock->prior_signal);
  616|      6|    pthread_mutex_unlock(&lock->prior_lock);
  617|       |
  618|      6|    retire_qp(lock, qp);
  619|       |
  620|       |    /* handle any callbacks that we have */
  621|      6|    while (cb_items != NULL) {
  ------------------
  |  Branch (621:12): [True: 0, False: 6]
  ------------------
  622|      0|        tmpcb = cb_items;
  623|      0|        cb_items = cb_items->next;
  624|      0|        tmpcb->fn(tmpcb->data);
  625|      0|        OPENSSL_free(tmpcb);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  626|      0|    }
  627|      6|}
ossl_rcu_uptr_deref:
  651|      4|{
  652|      4|    return ATOMIC_LOAD_N(pvoid, p, __ATOMIC_ACQUIRE);
  ------------------
  |  |  122|      4|#   define ATOMIC_LOAD_N(t, p, o) __atomic_load_n(p, o)
  ------------------
  653|      4|}
ossl_rcu_assign_uptr:
  656|      4|{
  657|      4|    ATOMIC_STORE(pvoid, p, v, __ATOMIC_RELEASE);
  ------------------
  |  |  125|      4|#  define ATOMIC_STORE(t, p, v, o) __atomic_store(p, v, o)
  ------------------
  658|      4|}
ossl_rcu_lock_new:
  661|      2|{
  662|      2|    struct rcu_lock_st *new;
  663|       |
  664|      2|    if (num_writers < 1)
  ------------------
  |  Branch (664:9): [True: 0, False: 2]
  ------------------
  665|      0|        num_writers = 1;
  666|       |
  667|      2|    ctx = ossl_lib_ctx_get_concrete(ctx);
  668|      2|    if (ctx == NULL)
  ------------------
  |  Branch (668:9): [True: 0, False: 2]
  ------------------
  669|      0|        return 0;
  670|       |
  671|      2|    new = OPENSSL_zalloc(sizeof(*new));
  ------------------
  |  |  104|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  672|      2|    if (new == NULL)
  ------------------
  |  Branch (672:9): [True: 0, False: 2]
  ------------------
  673|      0|        return NULL;
  674|       |
  675|      2|    new->ctx = ctx;
  676|      2|    pthread_mutex_init(&new->write_lock, NULL);
  677|      2|    pthread_mutex_init(&new->prior_lock, NULL);
  678|      2|    pthread_mutex_init(&new->alloc_lock, NULL);
  679|      2|    pthread_cond_init(&new->prior_signal, NULL);
  680|      2|    pthread_cond_init(&new->alloc_signal, NULL);
  681|      2|    new->qp_group = allocate_new_qp_group(new, num_writers + 1);
  682|      2|    if (new->qp_group == NULL) {
  ------------------
  |  Branch (682:9): [True: 0, False: 2]
  ------------------
  683|      0|        OPENSSL_free(new);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  684|      0|        new = NULL;
  685|      0|    }
  686|      2|    return new;
  687|      2|}
ossl_rcu_lock_free:
  690|      2|{
  691|      2|    struct rcu_lock_st *rlock = (struct rcu_lock_st *)lock;
  692|       |
  693|      2|    if (lock == NULL)
  ------------------
  |  Branch (693:9): [True: 0, False: 2]
  ------------------
  694|      0|        return;
  695|       |
  696|       |    /* make sure we're synchronized */
  697|      2|    ossl_synchronize_rcu(rlock);
  698|       |
  699|      2|    OPENSSL_free(rlock->qp_group);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  700|       |    /* There should only be a single qp left now */
  701|      2|    OPENSSL_free(rlock);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  702|      2|}
CRYPTO_THREAD_lock_new:
  705|     94|{
  706|     94|# ifdef USE_RWLOCK
  707|     94|    CRYPTO_RWLOCK *lock;
  708|       |
  709|     94|    if ((lock = OPENSSL_zalloc(sizeof(pthread_rwlock_t))) == NULL)
  ------------------
  |  |  104|     94|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     94|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     94|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (709:9): [True: 0, False: 94]
  ------------------
  710|       |        /* Don't set error, to avoid recursion blowup. */
  711|      0|        return NULL;
  712|       |
  713|     94|    if (pthread_rwlock_init(lock, NULL) != 0) {
  ------------------
  |  Branch (713:9): [True: 0, False: 94]
  ------------------
  714|      0|        OPENSSL_free(lock);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  715|      0|        return NULL;
  716|      0|    }
  717|       |# else
  718|       |    pthread_mutexattr_t attr;
  719|       |    CRYPTO_RWLOCK *lock;
  720|       |
  721|       |    if ((lock = OPENSSL_zalloc(sizeof(pthread_mutex_t))) == NULL)
  722|       |        /* Don't set error, to avoid recursion blowup. */
  723|       |        return NULL;
  724|       |
  725|       |    /*
  726|       |     * We don't use recursive mutexes, but try to catch errors if we do.
  727|       |     */
  728|       |    pthread_mutexattr_init(&attr);
  729|       |#  if !defined (__TANDEM) && !defined (_SPT_MODEL_)
  730|       |#   if !defined(NDEBUG) && !defined(OPENSSL_NO_MUTEX_ERRORCHECK)
  731|       |    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
  732|       |#   endif
  733|       |#  else
  734|       |    /* The SPT Thread Library does not define MUTEX attributes. */
  735|       |#  endif
  736|       |
  737|       |    if (pthread_mutex_init(lock, &attr) != 0) {
  738|       |        pthread_mutexattr_destroy(&attr);
  739|       |        OPENSSL_free(lock);
  740|       |        return NULL;
  741|       |    }
  742|       |
  743|       |    pthread_mutexattr_destroy(&attr);
  744|       |# endif
  745|       |
  746|     94|    return lock;
  747|     94|}
CRYPTO_THREAD_read_lock:
  750|    180|{
  751|    180|# ifdef USE_RWLOCK
  752|    180|    if (pthread_rwlock_rdlock(lock) != 0)
  ------------------
  |  Branch (752:9): [True: 0, False: 180]
  ------------------
  753|      0|        return 0;
  754|       |# else
  755|       |    if (pthread_mutex_lock(lock) != 0) {
  756|       |        assert(errno != EDEADLK && errno != EBUSY);
  757|       |        return 0;
  758|       |    }
  759|       |# endif
  760|       |
  761|    180|    return 1;
  762|    180|}
CRYPTO_THREAD_write_lock:
  765|  1.60k|{
  766|  1.60k|# ifdef USE_RWLOCK
  767|  1.60k|    if (pthread_rwlock_wrlock(lock) != 0)
  ------------------
  |  Branch (767:9): [True: 0, False: 1.60k]
  ------------------
  768|      0|        return 0;
  769|       |# else
  770|       |    if (pthread_mutex_lock(lock) != 0) {
  771|       |        assert(errno != EDEADLK && errno != EBUSY);
  772|       |        return 0;
  773|       |    }
  774|       |# endif
  775|       |
  776|  1.60k|    return 1;
  777|  1.60k|}
CRYPTO_THREAD_unlock:
  780|  1.78k|{
  781|  1.78k|# ifdef USE_RWLOCK
  782|  1.78k|    if (pthread_rwlock_unlock(lock) != 0)
  ------------------
  |  Branch (782:9): [True: 0, False: 1.78k]
  ------------------
  783|      0|        return 0;
  784|       |# else
  785|       |    if (pthread_mutex_unlock(lock) != 0) {
  786|       |        assert(errno != EPERM);
  787|       |        return 0;
  788|       |    }
  789|       |# endif
  790|       |
  791|  1.78k|    return 1;
  792|  1.78k|}
CRYPTO_THREAD_lock_free:
  795|     64|{
  796|     64|    if (lock == NULL)
  ------------------
  |  Branch (796:9): [True: 14, False: 50]
  ------------------
  797|     14|        return;
  798|       |
  799|     50|# ifdef USE_RWLOCK
  800|     50|    pthread_rwlock_destroy(lock);
  801|       |# else
  802|       |    pthread_mutex_destroy(lock);
  803|       |# endif
  804|     50|    OPENSSL_free(lock);
  ------------------
  |  |  115|     50|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|     50|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|     50|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  805|       |
  806|     50|    return;
  807|     64|}
CRYPTO_THREAD_run_once:
  810|  1.62k|{
  811|  1.62k|    if (pthread_once(once, init) != 0)
  ------------------
  |  Branch (811:9): [True: 0, False: 1.62k]
  ------------------
  812|      0|        return 0;
  813|       |
  814|  1.62k|    return 1;
  815|  1.62k|}
CRYPTO_THREAD_init_local:
  818|     24|{
  819|     24|    if (pthread_key_create(key, cleanup) != 0)
  ------------------
  |  Branch (819:9): [True: 0, False: 24]
  ------------------
  820|      0|        return 0;
  821|       |
  822|     24|    return 1;
  823|     24|}
CRYPTO_THREAD_get_local:
  826|     74|{
  827|     74|    return pthread_getspecific(*key);
  828|     74|}
CRYPTO_THREAD_set_local:
  831|     16|{
  832|     16|    if (pthread_setspecific(*key, val) != 0)
  ------------------
  |  Branch (832:9): [True: 0, False: 16]
  ------------------
  833|      0|        return 0;
  834|       |
  835|     16|    return 1;
  836|     16|}
CRYPTO_THREAD_cleanup_local:
  839|     18|{
  840|     18|    if (pthread_key_delete(*key) != 0)
  ------------------
  |  Branch (840:9): [True: 0, False: 18]
  ------------------
  841|      0|        return 0;
  842|       |
  843|     18|    return 1;
  844|     18|}
CRYPTO_atomic_add:
  857|      4|{
  858|      4|# if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
  859|      4|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (859:9): [Folded - Ignored]
  ------------------
  860|      4|        *ret = __atomic_add_fetch(val, amount, __ATOMIC_ACQ_REL);
  861|      4|        return 1;
  862|      4|    }
  863|       |# elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
  864|       |    /* This will work for all future Solaris versions. */
  865|       |    if (ret != NULL) {
  866|       |        *ret = atomic_add_int_nv((volatile unsigned int *)val, amount);
  867|       |        return 1;
  868|       |    }
  869|       |# endif
  870|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (870:9): [True: 0, False: 0]
  |  Branch (870:25): [True: 0, False: 0]
  ------------------
  871|      0|        return 0;
  872|       |
  873|      0|    *val += amount;
  874|      0|    *ret  = *val;
  875|       |
  876|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (876:9): [True: 0, False: 0]
  ------------------
  877|      0|        return 0;
  878|       |
  879|      0|    return 1;
  880|      0|}
CRYPTO_atomic_or:
  936|      8|{
  937|      8|# if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
  938|      8|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (938:9): [Folded - Ignored]
  ------------------
  939|      8|        *ret = __atomic_or_fetch(val, op, __ATOMIC_ACQ_REL);
  940|      8|        return 1;
  941|      8|    }
  942|       |# elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
  943|       |    /* This will work for all future Solaris versions. */
  944|       |    if (ret != NULL) {
  945|       |        *ret = atomic_or_64_nv(val, op);
  946|       |        return 1;
  947|       |    }
  948|       |# endif
  949|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (949:9): [True: 0, False: 0]
  |  Branch (949:25): [True: 0, False: 0]
  ------------------
  950|      0|        return 0;
  951|      0|    *val |= op;
  952|      0|    *ret  = *val;
  953|       |
  954|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (954:9): [True: 0, False: 0]
  ------------------
  955|      0|        return 0;
  956|       |
  957|      0|    return 1;
  958|      0|}
CRYPTO_atomic_load:
  961|     44|{
  962|     44|# if defined(__GNUC__) && defined(__ATOMIC_ACQUIRE) && !defined(BROKEN_CLANG_ATOMICS)
  963|     44|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (963:9): [Folded - Ignored]
  ------------------
  964|     44|        __atomic_load(val, ret, __ATOMIC_ACQUIRE);
  965|     44|        return 1;
  966|     44|    }
  967|       |# elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
  968|       |    /* This will work for all future Solaris versions. */
  969|       |    if (ret != NULL) {
  970|       |        *ret = atomic_or_64_nv(val, 0);
  971|       |        return 1;
  972|       |    }
  973|       |# endif
  974|      0|    if (lock == NULL || !CRYPTO_THREAD_read_lock(lock))
  ------------------
  |  Branch (974:9): [True: 0, False: 0]
  |  Branch (974:25): [True: 0, False: 0]
  ------------------
  975|      0|        return 0;
  976|      0|    *ret  = *val;
  977|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (977:9): [True: 0, False: 0]
  ------------------
  978|      0|        return 0;
  979|       |
  980|      0|    return 1;
  981|      0|}
threads_pthread.c:update_qp:
  501|      6|{
  502|      6|    uint64_t new_id;
  503|      6|    uint32_t current_idx;
  504|       |
  505|      6|    pthread_mutex_lock(&lock->alloc_lock);
  506|       |
  507|       |    /*
  508|       |     * we need at least one qp to be available with one
  509|       |     * left over, so that readers can start working on
  510|       |     * one that isn't yet being waited on
  511|       |     */
  512|      6|    while (lock->group_count - lock->writers_alloced < 2)
  ------------------
  |  Branch (512:12): [True: 0, False: 6]
  ------------------
  513|       |        /* we have to wait for one to be free */
  514|      0|        pthread_cond_wait(&lock->alloc_signal, &lock->alloc_lock);
  515|       |
  516|      6|    current_idx = lock->current_alloc_idx;
  517|       |
  518|       |    /* Allocate the qp */
  519|      6|    lock->writers_alloced++;
  520|       |
  521|       |    /* increment the allocation index */
  522|      6|    lock->current_alloc_idx =
  523|      6|        (lock->current_alloc_idx + 1) % lock->group_count;
  524|       |
  525|       |    /* get and insert a new id */
  526|      6|    new_id = VAL_ID(lock->id_ctr);
  ------------------
  |  |  285|      6|# define VAL_ID(x)       ((uint64_t)x << ID_SHIFT)
  |  |  ------------------
  |  |  |  |  274|      6|# define ID_SHIFT 32
  |  |  ------------------
  ------------------
  527|      6|    lock->id_ctr++;
  528|       |
  529|       |    /*
  530|       |     * Even though we are under a write side lock here
  531|       |     * We need to use atomic instructions to ensure that the results
  532|       |     * of this update are published to the read side prior to updating the
  533|       |     * reader idx below
  534|       |     */
  535|      6|    ATOMIC_AND_FETCH(&lock->qp_group[current_idx].users, ID_MASK,
  ------------------
  |  |  130|      6|#  define ATOMIC_AND_FETCH(p, m, o) __atomic_and_fetch(p, m, o)
  ------------------
  536|      6|                     __ATOMIC_RELEASE);
  537|      6|    ATOMIC_OR_FETCH(&lock->qp_group[current_idx].users, new_id,
  ------------------
  |  |  131|      6|#  define ATOMIC_OR_FETCH(p, m, o) __atomic_or_fetch(p, m, o)
  ------------------
  538|      6|                    __ATOMIC_RELEASE);
  539|       |
  540|       |    /*
  541|       |     * Update the reader index to be the prior qp.
  542|       |     * Note the use of __ATOMIC_RELEASE here is based on the corresponding use
  543|       |     * of __ATOMIC_ACQUIRE in get_hold_current_qp, as we want any publication
  544|       |     * of this value to be seen on the read side immediately after it happens
  545|       |     */
  546|      6|    ATOMIC_STORE_N(uint32_t, &lock->reader_idx, lock->current_alloc_idx,
  ------------------
  |  |  124|      6|#  define ATOMIC_STORE_N(t, p, v, o) __atomic_store_n(p, v, o)
  ------------------
  547|      6|                   __ATOMIC_RELEASE);
  548|       |
  549|       |    /* wake up any waiters */
  550|      6|    pthread_cond_signal(&lock->alloc_signal);
  551|      6|    pthread_mutex_unlock(&lock->alloc_lock);
  552|      6|    return &lock->qp_group[current_idx];
  553|      6|}
threads_pthread.c:retire_qp:
  556|      6|{
  557|      6|    pthread_mutex_lock(&lock->alloc_lock);
  558|      6|    lock->writers_alloced--;
  559|      6|    pthread_cond_signal(&lock->alloc_signal);
  560|      6|    pthread_mutex_unlock(&lock->alloc_lock);
  561|      6|}
threads_pthread.c:allocate_new_qp_group:
  567|      2|{
  568|      2|    struct rcu_qp *new =
  569|      2|        OPENSSL_zalloc(sizeof(*new) * count);
  ------------------
  |  |  104|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  570|       |
  571|      2|    lock->group_count = count;
  572|      2|    return new;
  573|      2|}

ossl_trace_cleanup:
  338|      2|{
  339|       |#ifndef OPENSSL_NO_TRACE
  340|       |    int category;
  341|       |    BIO *channel = NULL;
  342|       |    const char *prefix = NULL;
  343|       |    const char *suffix = NULL;
  344|       |
  345|       |    for (category = 0; category < OSSL_TRACE_CATEGORY_NUM; category++) {
  346|       |        /* We force the TRACE category to be treated last */
  347|       |        if (category == OSSL_TRACE_CATEGORY_TRACE)
  348|       |            continue;
  349|       |        set_trace_data(category, 0, &channel, &prefix, &suffix,
  350|       |                       trace_attach_cb, trace_detach_cb);
  351|       |    }
  352|       |    set_trace_data(OSSL_TRACE_CATEGORY_TRACE, 0, &channel,
  353|       |                   &prefix, &suffix,
  354|       |                   trace_attach_cb, trace_detach_cb);
  355|       |    CRYPTO_THREAD_lock_free(trace_lock);
  356|       |#endif
  357|      2|}
OSSL_trace_set_channel:
  360|      2|{
  361|       |#ifndef OPENSSL_NO_TRACE
  362|       |    if (category >= 0 && category < OSSL_TRACE_CATEGORY_NUM)
  363|       |        return set_trace_data(category, SIMPLE_CHANNEL, &channel, NULL, NULL,
  364|       |                              trace_attach_cb, trace_detach_cb);
  365|       |#endif
  366|      2|    return 0;
  367|      2|}

ossl_err_load_TS_strings:
   82|      2|{
   83|      2|# ifndef OPENSSL_NO_ERR
   84|      2|    if (ERR_reason_error_string(TS_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (84:9): [True: 2, False: 0]
  ------------------
   85|      2|        ERR_load_strings_const(TS_str_reasons);
   86|      2|# endif
   87|      2|    return 1;
   88|      2|}

ossl_err_load_UI_strings:
   41|      2|{
   42|      2|#ifndef OPENSSL_NO_ERR
   43|      2|    if (ERR_reason_error_string(UI_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (43:9): [True: 2, False: 0]
  ------------------
   44|      2|        ERR_load_strings_const(UI_str_reasons);
   45|      2|#endif
   46|      2|    return 1;
   47|      2|}

ossl_err_load_X509V3_strings:
  144|      2|{
  145|      2|#ifndef OPENSSL_NO_ERR
  146|      2|    if (ERR_reason_error_string(X509V3_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (146:9): [True: 2, False: 0]
  ------------------
  147|      2|        ERR_load_strings_const(X509V3_str_reasons);
  148|      2|#endif
  149|      2|    return 1;
  150|      2|}

X509_get_default_cert_area:
   79|      2|{
   80|       |#if defined (_WIN32)
   81|       |    RUN_ONCE(&openssldir_setup_init, do_openssldir_setup);
   82|       |    return x509_cert_areaptr;
   83|       |#else
   84|      2|    return X509_CERT_AREA;
  ------------------
  |  |   84|      2|#  define X509_CERT_AREA          OPENSSLDIR
  ------------------
   85|      2|#endif
   86|      2|}

ossl_err_load_X509_strings:
   92|      2|{
   93|      2|#ifndef OPENSSL_NO_ERR
   94|      2|    if (ERR_reason_error_string(X509_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (94:9): [True: 2, False: 0]
  ------------------
   95|      2|        ERR_load_strings_const(X509_str_reasons);
   96|      2|#endif
   97|      2|    return 1;
   98|      2|}

LLVMFuzzerInitialize:
   22|      2|{
   23|      2|    return FuzzerInitialize(argc, argv);
   24|      2|}
LLVMFuzzerTestOneInput:
   27|  2.40k|{
   28|  2.40k|    return FuzzerTestOneInput(buf, len);
   29|  2.40k|}

FuzzerSetRand:
  158|      2|{
  159|      2|    if (!OSSL_PROVIDER_add_builtin(NULL, "fuzz-rand", fuzz_rand_provider_init)
  ------------------
  |  Branch (159:9): [True: 0, False: 2]
  ------------------
  160|      2|        || !RAND_set_DRBG_type(NULL, "fuzz", NULL, NULL, NULL)
  ------------------
  |  Branch (160:12): [True: 0, False: 2]
  ------------------
  161|      2|        || (r_prov = OSSL_PROVIDER_try_load(NULL, "fuzz-rand", 1)) == NULL)
  ------------------
  |  Branch (161:12): [True: 0, False: 2]
  ------------------
  162|      0|        exit(1);
  163|      2|}
fuzz_rand.c:fuzz_rand_provider_init:
  147|      2|{
  148|      2|    *provctx = OSSL_LIB_CTX_new();
  149|      2|    if (*provctx == NULL)
  ------------------
  |  Branch (149:9): [True: 0, False: 2]
  ------------------
  150|      0|        return 0;
  151|      2|    *out = fuzz_rand_method;
  152|      2|    return 1;
  153|      2|}

FuzzerInitialize:
   19|      2|{
   20|      2|    FuzzerSetRand();
   21|      2|    OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS | OPENSSL_INIT_ASYNC, NULL);
  ------------------
  |  |  463|      2|# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS    0x00000002L
  ------------------
                  OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS | OPENSSL_INIT_ASYNC, NULL);
  ------------------
  |  |  470|      2|# define OPENSSL_INIT_ASYNC                  0x00000100L
  ------------------
   22|      2|    OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL);
  ------------------
  |  | 2767|      2|# define OPENSSL_INIT_LOAD_SSL_STRINGS       0x00200000L
  ------------------
   23|      2|    ERR_clear_error();
   24|      2|    return 1;
   25|      2|}
FuzzerTestOneInput:
   76|  2.40k|{
   77|  2.40k|    int rc = 0;
   78|  2.40k|    QUIC_RCIDM *rcidm = NULL;
   79|  2.40k|    PACKET pkt;
   80|  2.40k|    uint64_t seq_num_out, arg_num_pkt;
   81|  2.40k|    unsigned int cmd, arg_clear;
   82|  2.40k|    QUIC_CONN_ID arg_cid, cid_out;
   83|  2.40k|    OSSL_QUIC_FRAME_NEW_CONN_ID ncid_frame;
   84|       |
   85|  2.40k|    if (!PACKET_buf_init(&pkt, buf, len))
  ------------------
  |  Branch (85:9): [True: 0, False: 2.40k]
  ------------------
   86|      0|        goto err;
   87|       |
   88|  2.40k|    if ((rcidm = ossl_quic_rcidm_new(NULL)) == NULL)
  ------------------
  |  Branch (88:9): [True: 0, False: 2.40k]
  ------------------
   89|      0|        goto err;
   90|       |
   91|  2.79M|    while (PACKET_remaining(&pkt) > 0) {
  ------------------
  |  Branch (91:12): [True: 2.79M, False: 2.09k]
  ------------------
   92|  2.79M|        if (!PACKET_get_1(&pkt, &cmd))
  ------------------
  |  Branch (92:13): [True: 0, False: 2.79M]
  ------------------
   93|      0|            goto err;
   94|       |
   95|  2.79M|        switch (cmd) {
   96|   557k|        case CMD_RESET_WITH_ODCID:
  ------------------
  |  Branch (96:9): [True: 557k, False: 2.23M]
  ------------------
   97|   557k|            if (!get_cid(&pkt, &arg_cid)) {
  ------------------
  |  Branch (97:17): [True: 33, False: 557k]
  ------------------
   98|     33|                rc = -1;
   99|     33|                goto err;
  100|     33|            }
  101|       |
  102|   557k|            ossl_quic_rcidm_free(rcidm);
  103|       |
  104|   557k|            if ((rcidm = ossl_quic_rcidm_new(&arg_cid)) == NULL)
  ------------------
  |  Branch (104:17): [True: 0, False: 557k]
  ------------------
  105|      0|                goto err;
  106|       |
  107|   557k|            break;
  108|       |
  109|   557k|        case CMD_RESET_WITHOUT_ODCID:
  ------------------
  |  Branch (109:9): [True: 9.67k, False: 2.78M]
  ------------------
  110|  9.67k|            ossl_quic_rcidm_free(rcidm);
  111|       |
  112|  9.67k|            if ((rcidm = ossl_quic_rcidm_new(NULL)) == NULL)
  ------------------
  |  Branch (112:17): [True: 0, False: 9.67k]
  ------------------
  113|      0|                goto err;
  114|       |
  115|  9.67k|            break;
  116|       |
  117|  9.67k|        case CMD_ADD_FROM_INITIAL:
  ------------------
  |  Branch (117:9): [True: 8.88k, False: 2.78M]
  ------------------
  118|  8.88k|            if (!get_cid(&pkt, &arg_cid)) {
  ------------------
  |  Branch (118:17): [True: 22, False: 8.86k]
  ------------------
  119|     22|                rc = -1;
  120|     22|                goto err;
  121|     22|            }
  122|       |
  123|  8.86k|            ossl_quic_rcidm_add_from_initial(rcidm, &arg_cid);
  124|  8.86k|            break;
  125|       |
  126|  7.87k|        case CMD_ADD_FROM_SERVER_RETRY:
  ------------------
  |  Branch (126:9): [True: 7.87k, False: 2.78M]
  ------------------
  127|  7.87k|            if (!get_cid(&pkt, &arg_cid)) {
  ------------------
  |  Branch (127:17): [True: 16, False: 7.85k]
  ------------------
  128|     16|                rc = -1;
  129|     16|                goto err;
  130|     16|            }
  131|       |
  132|  7.85k|            ossl_quic_rcidm_add_from_server_retry(rcidm, &arg_cid);
  133|  7.85k|            break;
  134|       |
  135|  1.43M|        case CMD_ADD_FROM_NCID:
  ------------------
  |  Branch (135:9): [True: 1.43M, False: 1.36M]
  ------------------
  136|  1.43M|            if (!PACKET_get_net_8(&pkt, &ncid_frame.seq_num)
  ------------------
  |  Branch (136:17): [True: 44, False: 1.43M]
  ------------------
  137|  1.43M|                || !PACKET_get_net_8(&pkt, &ncid_frame.retire_prior_to)
  ------------------
  |  Branch (137:20): [True: 35, False: 1.43M]
  ------------------
  138|  1.43M|                || !get_cid(&pkt, &ncid_frame.conn_id)) {
  ------------------
  |  Branch (138:20): [True: 74, False: 1.43M]
  ------------------
  139|    153|                rc = -1;
  140|    153|                goto err;
  141|    153|            }
  142|       |
  143|  1.43M|            ossl_quic_rcidm_add_from_ncid(rcidm, &ncid_frame);
  144|  1.43M|            break;
  145|       |
  146|  13.3k|        case CMD_ON_HANDSHAKE_COMPLETE:
  ------------------
  |  Branch (146:9): [True: 13.3k, False: 2.78M]
  ------------------
  147|  13.3k|            ossl_quic_rcidm_on_handshake_complete(rcidm);
  148|  13.3k|            break;
  149|       |
  150|  9.07k|        case CMD_ON_PACKET_SENT:
  ------------------
  |  Branch (150:9): [True: 9.07k, False: 2.78M]
  ------------------
  151|  9.07k|            if (!PACKET_get_net_8(&pkt, &arg_num_pkt)) {
  ------------------
  |  Branch (151:17): [True: 6, False: 9.06k]
  ------------------
  152|      6|                rc = -1;
  153|      6|                goto err;
  154|      6|            }
  155|       |
  156|  9.06k|            ossl_quic_rcidm_on_packet_sent(rcidm, arg_num_pkt);
  157|  9.06k|            break;
  158|       |
  159|   699k|        case CMD_REQUEST_ROLL:
  ------------------
  |  Branch (159:9): [True: 699k, False: 2.09M]
  ------------------
  160|   699k|            ossl_quic_rcidm_request_roll(rcidm);
  161|   699k|            break;
  162|       |
  163|  7.32k|        case CMD_POP_RETIRE_SEQ_NUM:
  ------------------
  |  Branch (163:9): [True: 7.32k, False: 2.79M]
  ------------------
  164|  7.32k|            ossl_quic_rcidm_pop_retire_seq_num(rcidm, &seq_num_out);
  165|  7.32k|            break;
  166|       |
  167|  1.94k|        case CMD_PEEK_RETIRE_SEQ_NUM:
  ------------------
  |  Branch (167:9): [True: 1.94k, False: 2.79M]
  ------------------
  168|  1.94k|            ossl_quic_rcidm_peek_retire_seq_num(rcidm, &seq_num_out);
  169|  1.94k|            break;
  170|       |
  171|  4.21k|        case CMD_GET_PREFERRED_TX_DCID:
  ------------------
  |  Branch (171:9): [True: 4.21k, False: 2.79M]
  ------------------
  172|  4.21k|            ossl_quic_rcidm_get_preferred_tx_dcid(rcidm, &cid_out);
  173|  4.21k|            break;
  174|       |
  175|  41.2k|        case CMD_GET_PREFERRED_TX_DCID_CHANGED:
  ------------------
  |  Branch (175:9): [True: 41.2k, False: 2.75M]
  ------------------
  176|  41.2k|            if (!PACKET_get_1(&pkt, &arg_clear)) {
  ------------------
  |  Branch (176:17): [True: 1, False: 41.2k]
  ------------------
  177|      1|                rc = -1;
  178|      1|                goto err;
  179|      1|            }
  180|       |
  181|  41.2k|            ossl_quic_rcidm_get_preferred_tx_dcid_changed(rcidm, arg_clear);
  182|  41.2k|            break;
  183|       |
  184|     80|        default:
  ------------------
  |  Branch (184:9): [True: 80, False: 2.79M]
  ------------------
  185|     80|            rc = -1;
  186|     80|            goto err;
  187|  2.79M|        }
  188|  2.79M|    }
  189|       |
  190|  2.40k|err:
  191|  2.40k|    ossl_quic_rcidm_free(rcidm);
  192|  2.40k|    return rc;
  193|  2.40k|}
quic-rcidm.c:get_cid:
   63|  2.01M|{
   64|  2.01M|    unsigned int cidl;
   65|       |
   66|  2.01M|    if (!PACKET_get_1(pkt, &cidl)
  ------------------
  |  Branch (66:9): [True: 21, False: 2.01M]
  ------------------
   67|  2.01M|        || cidl > QUIC_MAX_CONN_ID_LEN
  ------------------
  |  |   75|  4.02M|#  define QUIC_MAX_CONN_ID_LEN   20
  ------------------
  |  Branch (67:12): [True: 80, False: 2.01M]
  ------------------
   68|  2.01M|        || !PACKET_copy_bytes(pkt, cid->id, cidl))
  ------------------
  |  Branch (68:12): [True: 44, False: 2.01M]
  ------------------
   69|    145|        return 0;
   70|       |
   71|  2.01M|    cid->id_len = (unsigned char)cidl;
   72|  2.01M|    return 1;
   73|  2.01M|}

EVP_aria_128_cbc:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_128_cfb128:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_128_ofb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_128_ecb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_192_cbc:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_192_cfb128:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_192_ofb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_192_ecb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_256_cbc:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_256_cfb128:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_256_ofb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_256_ecb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_128_cfb1:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_192_cfb1:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_256_cfb1:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_128_cfb8:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_192_cfb8:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_aria_256_cfb8:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_bf_cbc:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_bf_cfb64:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_bf_ofb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_bf_ecb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_cast5_cbc:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_cast5_cfb64:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_cast5_ofb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_cast5_ecb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_cbc:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_cfb64:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ofb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ecb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_cfb1:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_cfb8:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede_cbc:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede_cfb64:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede_ofb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede3_cbc:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede3_cfb64:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede3_ofb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede3_cfb1:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_des_ede3_cfb8:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_idea_cbc:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_idea_cfb64:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_idea_ofb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_idea_ecb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc2_cbc:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc2_cfb64:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc2_ofb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc2_ecb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc5_32_12_16_cbc:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc5_32_12_16_cfb64:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc5_32_12_16_ofb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_rc5_32_12_16_ecb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_seed_cbc:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_seed_cfb128:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_seed_ofb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }
EVP_seed_ecb:
  454|      2|const EVP_CIPHER *EVP_##cname##_##mode(void) { return &cname##_##mode; }

property.c:ossl_sa_ALGORITHM_new:
   27|     16|    { \
   28|     16|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new(); \
   29|     16|    } \
property.c:ossl_sa_ALGORITHM_doall_arg:
   56|      8|    { \
   57|      8|        ossl_sa_doall_arg((OPENSSL_SA *)sa, \
   58|      8|                          (void (*)(ossl_uintmax_t, void *, void *))leaf, arg); \
   59|      8|    } \
property.c:ossl_sa_ALGORITHM_free:
   32|      8|    { \
   33|      8|        ossl_sa_free((OPENSSL_SA *)sa); \
   34|      8|    } \
property.c:ossl_sa_ALGORITHM_doall:
   48|      8|    { \
   49|      8|        ossl_sa_doall((OPENSSL_SA *)sa, \
   50|      8|                      (void (*)(ossl_uintmax_t, void *))leaf); \
   51|      8|    } \

bio_print.c:ossl_assert_int:
   45|    292|{
   46|    292|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 292]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|    292|    return expr;
   50|    292|}
provider_core.c:ossl_assert_int:
   45|      4|{
   46|      4|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 4]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|      4|    return expr;
   50|      4|}

quic_rcidm.c:ossl_list_retiring_head:
   92|  4.57M|    {                                                                       \
   93|  4.57M|        assert(list->alpha == NULL                                          \
   94|  4.57M|               || list->alpha->ossl_list_ ## name.list == list);            \
   95|  4.57M|        return list->alpha;                                                 \
   96|  4.57M|    }                                                                       \
quic_rcidm.c:ossl_list_retiring_next:
  106|  5.70M|    {                                                                       \
  107|  5.70M|        assert(elem->ossl_list_ ## name.next == NULL                        \
  108|  5.70M|               || elem->ossl_list_ ## name.next                             \
  109|  5.70M|                      ->ossl_list_ ## name.prev == elem);                   \
  110|  5.70M|        return elem->ossl_list_ ## name.next;                               \
  111|  5.70M|    }                                                                       \
quic_rcidm.c:ossl_list_retiring_insert_tail:
  155|   856k|    {                                                                       \
  156|   856k|        assert(elem->ossl_list_ ## name.list == NULL);                      \
  157|   856k|        OSSL_LIST_DBG(elem->ossl_list_ ## name.list = list)                 \
  ------------------
  |  |   20|   856k|#  define OSSL_LIST_DBG(x) x;
  ------------------
  158|   856k|        if (list->omega != NULL)                                            \
  ------------------
  |  Branch (158:13): [True: 850k, False: 6.11k]
  ------------------
  159|   856k|            list->omega->ossl_list_ ## name.next = elem;                    \
  160|   856k|        elem->ossl_list_ ## name.prev = list->omega;                        \
  161|   856k|        elem->ossl_list_ ## name.next = NULL;                               \
  162|   856k|        list->omega = elem;                                                 \
  163|   856k|        if (list->alpha == NULL)                                            \
  ------------------
  |  Branch (163:13): [True: 6.11k, False: 850k]
  ------------------
  164|   856k|            list->alpha = elem;                                             \
  165|   856k|        list->num_elems++;                                                  \
  166|   856k|    }                                                                       \
quic_rcidm.c:ossl_list_retiring_prev:
  114|  4.85M|    {                                                                       \
  115|  4.85M|        assert(elem->ossl_list_ ## name.prev == NULL                        \
  116|  4.85M|               || elem->ossl_list_ ## name.prev                             \
  117|  4.85M|                      ->ossl_list_ ## name.next == elem);                   \
  118|  4.85M|        return elem->ossl_list_ ## name.prev;                               \
  119|  4.85M|    }                                                                       \
quic_rcidm.c:ossl_list_retiring_remove:
  122|  1.71k|    {                                                                       \
  123|  1.71k|        assert(elem->ossl_list_ ## name.list == list);                      \
  124|  1.71k|        OSSL_LIST_DBG(elem->ossl_list_ ## name.list = NULL)                 \
  ------------------
  |  |   20|  1.71k|#  define OSSL_LIST_DBG(x) x;
  ------------------
  125|  1.71k|        if (list->alpha == elem)                                            \
  ------------------
  |  Branch (125:13): [True: 1.71k, False: 0]
  ------------------
  126|  1.71k|            list->alpha = elem->ossl_list_ ## name.next;                    \
  127|  1.71k|        if (list->omega == elem)                                            \
  ------------------
  |  Branch (127:13): [True: 781, False: 934]
  ------------------
  128|  1.71k|            list->omega = elem->ossl_list_ ## name.prev;                    \
  129|  1.71k|        if (elem->ossl_list_ ## name.prev != NULL)                          \
  ------------------
  |  Branch (129:13): [True: 0, False: 1.71k]
  ------------------
  130|  1.71k|            elem->ossl_list_ ## name.prev->ossl_list_ ## name.next =        \
  131|      0|                    elem->ossl_list_ ## name.next;                          \
  132|  1.71k|        if (elem->ossl_list_ ## name.next != NULL)                          \
  ------------------
  |  Branch (132:13): [True: 934, False: 781]
  ------------------
  133|  1.71k|            elem->ossl_list_ ## name.next->ossl_list_ ## name.prev =        \
  134|    934|                    elem->ossl_list_ ## name.prev;                          \
  135|  1.71k|        list->num_elems--;                                                  \
  136|  1.71k|        memset(&elem->ossl_list_ ## name, 0,                                \
  137|  1.71k|               sizeof(elem->ossl_list_ ## name));                           \
  138|  1.71k|    }                                                                       \

quic-rcidm.c:PACKET_buf_init:
   72|  2.40k|{
   73|       |    /* Sanity check for negative values. */
   74|  2.40k|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (74:9): [True: 0, False: 2.40k]
  ------------------
   75|      0|        return 0;
   76|       |
   77|  2.40k|    pkt->curr = buf;
   78|  2.40k|    pkt->remaining = len;
   79|  2.40k|    return 1;
   80|  2.40k|}
quic-rcidm.c:PACKET_remaining:
   40|  12.5M|{
   41|  12.5M|    return pkt->remaining;
   42|  12.5M|}
quic-rcidm.c:PACKET_get_1:
  302|  4.85M|{
  303|  4.85M|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (303:9): [True: 22, False: 4.85M]
  ------------------
  304|     22|        return 0;
  305|       |
  306|  4.85M|    packet_forward(pkt, 1);
  307|       |
  308|  4.85M|    return 1;
  309|  4.85M|}
quic-rcidm.c:PACKET_peek_1:
  291|  4.85M|{
  292|  4.85M|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (292:9): [True: 22, False: 4.85M]
  ------------------
  293|     22|        return 0;
  294|       |
  295|  4.85M|    *data = *pkt->curr;
  296|       |
  297|  4.85M|    return 1;
  298|  4.85M|}
quic-rcidm.c:packet_forward:
   31|  9.74M|{
   32|  9.74M|    pkt->curr += len;
   33|  9.74M|    pkt->remaining -= len;
   34|  9.74M|}
quic-rcidm.c:PACKET_copy_bytes:
  411|  2.01M|{
  412|  2.01M|    if (!PACKET_peek_copy_bytes(pkt, data, len))
  ------------------
  |  Branch (412:9): [True: 44, False: 2.01M]
  ------------------
  413|     44|        return 0;
  414|       |
  415|  2.01M|    packet_forward(pkt, len);
  416|       |
  417|  2.01M|    return 1;
  418|  2.01M|}
quic-rcidm.c:PACKET_peek_copy_bytes:
  396|  2.01M|{
  397|  2.01M|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (397:9): [True: 44, False: 2.01M]
  ------------------
  398|     44|        return 0;
  399|       |
  400|  2.01M|    memcpy(data, pkt->curr, len);
  401|       |
  402|  2.01M|    return 1;
  403|  2.01M|}
quic-rcidm.c:PACKET_get_net_8:
  279|  2.88M|{
  280|  2.88M|    if (!PACKET_peek_net_8(pkt, data))
  ------------------
  |  Branch (280:9): [True: 85, False: 2.88M]
  ------------------
  281|     85|        return 0;
  282|       |
  283|  2.88M|    packet_forward(pkt, 8);
  284|       |
  285|  2.88M|    return 1;
  286|  2.88M|}
quic-rcidm.c:PACKET_peek_net_8:
  237|  2.88M|{
  238|  2.88M|    if (PACKET_remaining(pkt) < 8)
  ------------------
  |  Branch (238:9): [True: 85, False: 2.88M]
  ------------------
  239|     85|        return 0;
  240|       |
  241|  2.88M|    *data = ((uint64_t)(*pkt->curr)) << 56;
  242|  2.88M|    *data |= ((uint64_t)(*(pkt->curr + 1))) << 48;
  243|  2.88M|    *data |= ((uint64_t)(*(pkt->curr + 2))) << 40;
  244|  2.88M|    *data |= ((uint64_t)(*(pkt->curr + 3))) << 32;
  245|  2.88M|    *data |= ((uint64_t)(*(pkt->curr + 4))) << 24;
  246|  2.88M|    *data |= ((uint64_t)(*(pkt->curr + 5))) << 16;
  247|  2.88M|    *data |= ((uint64_t)(*(pkt->curr + 6))) << 8;
  248|  2.88M|    *data |= *(pkt->curr + 7);
  249|       |
  250|  2.88M|    return 1;
  251|  2.88M|}

quic_rcidm.c:ossl_pqueue_RCID_new:
   23|   569k|    {                                                                       \
   24|   569k|        return (PRIORITY_QUEUE_OF(type) *)ossl_pqueue_new(                  \
   25|   569k|                    (int (*)(const void *, const void *))compare);          \
   26|   569k|    }                                                                       \
quic_rcidm.c:ossl_pqueue_RCID_pop:
   61|  1.13M|    {                                                                       \
   62|  1.13M|        return (type *)ossl_pqueue_pop((OSSL_PQUEUE *)pq);                  \
   63|  1.13M|    }                                                                       \
quic_rcidm.c:ossl_pqueue_RCID_free:
   29|   569k|    {                                                                       \
   30|   569k|        ossl_pqueue_free((OSSL_PQUEUE *)pq);                                \
   31|   569k|    }                                                                       \
quic_rcidm.c:ossl_pqueue_RCID_peek:
   56|  2.20M|    {                                                                       \
   57|  2.20M|        return (type *)ossl_pqueue_peek((OSSL_PQUEUE *)pq);                 \
   58|  2.20M|    }                                                                       \
quic_rcidm.c:ossl_pqueue_RCID_remove:
   67|   576k|    {                                                                       \
   68|   576k|        return (type *)ossl_pqueue_remove((OSSL_PQUEUE *)pq, elem);         \
   69|   576k|    }                                                                       \
quic_rcidm.c:ossl_pqueue_RCID_push:
   51|  1.14M|    {                                                                       \
   52|  1.14M|        return ossl_pqueue_push((OSSL_PQUEUE *)pq, (void *)data, elem);     \
   53|  1.14M|    }                                                                       \
quic_rcidm.c:ossl_pqueue_RCID_num:
   45|  1.43M|    {                                                                       \
   46|  1.43M|        return ossl_pqueue_num((OSSL_PQUEUE *)pq);                          \
   47|  1.43M|    }                                                                       \

quic_rcidm.c:ossl_quic_conn_id_eq:
   84|  2.29M|{
   85|  2.29M|    if (a->id_len != b->id_len || a->id_len > QUIC_MAX_CONN_ID_LEN)
  ------------------
  |  |   75|  2.25M|#  define QUIC_MAX_CONN_ID_LEN   20
  ------------------
  |  Branch (85:9): [True: 40.2k, False: 2.25M]
  |  Branch (85:35): [True: 0, False: 2.25M]
  ------------------
   86|  40.2k|        return 0;
   87|  2.25M|    return memcmp(a->id, b->id, a->id_len) == 0;
   88|  2.29M|}

bio_lib.c:CRYPTO_FREE_REF:
  273|      2|static ossl_unused ossl_inline void CRYPTO_FREE_REF(CRYPTO_REF_COUNT *refcnt)                                  \
  274|      2|{
  275|      2|}
provider_core.c:CRYPTO_UP_REF:
   34|      2|{
   35|      2|    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   36|      2|    return 1;
   37|      2|}
provider_core.c:CRYPTO_NEW_REF:
  268|      2|{
  269|      2|    refcnt->val = n;
  270|      2|    return 1;
  271|      2|}
provider_core.c:CRYPTO_DOWN_REF:
   50|      2|{
   51|      2|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_relaxed) - 1;
   52|      2|    if (*ret == 0)
  ------------------
  |  Branch (52:9): [True: 0, False: 2]
  ------------------
   53|      0|        atomic_thread_fence(memory_order_acquire);
   54|      2|    return 1;
   55|      2|}

priority_queue.c:safe_muldiv_size_t:
  351|  6.60k|    {                                                                        \
  352|  6.60k|        int e2 = 0;                                                          \
  353|  6.60k|        type x, y;                                                           \
  354|  6.60k|                                                                             \
  355|  6.60k|        if (c == 0) {                                                        \
  ------------------
  |  Branch (355:13): [True: 0, False: 6.60k]
  ------------------
  356|      0|            *err |= 1;                                                       \
  357|      0|            return a == 0 || b == 0 ? 0 : max;                               \
  ------------------
  |  Branch (357:20): [True: 0, False: 0]
  |  Branch (357:30): [True: 0, False: 0]
  ------------------
  358|      0|        }                                                                    \
  359|  6.60k|        x = safe_mul_ ## type_name(a, b, &e2);                               \
  360|  6.60k|        if (!e2)                                                             \
  ------------------
  |  Branch (360:13): [True: 6.60k, False: 0]
  ------------------
  361|  6.60k|            return x / c;                                                    \
  362|  6.60k|        if (b > a) {                                                         \
  ------------------
  |  Branch (362:13): [True: 0, False: 0]
  ------------------
  363|      0|            x = b;                                                           \
  364|      0|            b = a;                                                           \
  365|      0|            a = x;                                                           \
  366|      0|        }                                                                    \
  367|      0|        x = safe_mul_ ## type_name(a % c, b, err);                           \
  368|      0|        y = safe_mul_ ## type_name(a / c, b, err);                           \
  369|      0|        return safe_add_ ## type_name(y, x / c, err);                        \
  370|  6.60k|    }
priority_queue.c:safe_mul_size_t:
  149|  6.60k|    {                                                                        \
  150|  6.60k|        type r;                                                              \
  151|  6.60k|                                                                             \
  152|  6.60k|        if (!__builtin_mul_overflow(a, b, &r))                               \
  ------------------
  |  Branch (152:13): [True: 6.60k, False: 0]
  ------------------
  153|  6.60k|            return r;                                                        \
  154|  6.60k|        *err |= 1;                                                           \
  155|      0|        return a * b;                                                          \
  156|  6.60k|    }
stack.c:safe_muldiv_int:
  322|      4|    {                                                                        \
  323|      4|        int e2 = 0;                                                          \
  324|      4|        type q, r, x, y;                                                     \
  325|      4|                                                                             \
  326|      4|        if (c == 0) {                                                        \
  ------------------
  |  Branch (326:13): [True: 0, False: 4]
  ------------------
  327|      0|            *err |= 1;                                                       \
  328|      0|            return a == 0 || b == 0 ? 0 : max;                               \
  ------------------
  |  Branch (328:20): [True: 0, False: 0]
  |  Branch (328:30): [True: 0, False: 0]
  ------------------
  329|      0|        }                                                                    \
  330|      4|        x = safe_mul_ ## type_name(a, b, &e2);                               \
  331|      4|        if (!e2)                                                             \
  ------------------
  |  Branch (331:13): [True: 4, False: 0]
  ------------------
  332|      4|            return safe_div_ ## type_name(x, c, err);                        \
  333|      4|        if (b > a) {                                                         \
  ------------------
  |  Branch (333:13): [True: 0, False: 0]
  ------------------
  334|      0|            x = b;                                                           \
  335|      0|            b = a;                                                           \
  336|      0|            a = x;                                                           \
  337|      0|        }                                                                    \
  338|      0|        q = safe_div_ ## type_name(a, c, err);                               \
  339|      0|        r = safe_mod_ ## type_name(a, c, err);                               \
  340|      0|        x = safe_mul_ ## type_name(r, b, err);                               \
  341|      0|        y = safe_mul_ ## type_name(q, b, err);                               \
  342|      0|        q = safe_div_ ## type_name(x, c, err);                               \
  343|      0|        return safe_add_ ## type_name(y, q, err);                            \
  344|      4|    }
stack.c:safe_mul_int:
  136|      4|    {                                                                        \
  137|      4|        type r;                                                              \
  138|      4|                                                                             \
  139|      4|        if (!__builtin_mul_overflow(a, b, &r))                               \
  ------------------
  |  Branch (139:13): [True: 4, False: 0]
  ------------------
  140|      4|            return r;                                                        \
  141|      4|        *err |= 1;                                                           \
  142|      0|        return (a < 0) ^ (b < 0) ? min : max;                                \
  ------------------
  |  Branch (142:16): [True: 0, False: 0]
  ------------------
  143|      4|    }
stack.c:safe_div_int:
  199|      4|    {                                                                        \
  200|      4|        if (b == 0) {                                                        \
  ------------------
  |  Branch (200:13): [True: 0, False: 4]
  ------------------
  201|      0|            *err |= 1;                                                       \
  202|      0|            return a < 0 ? min : max;                                        \
  ------------------
  |  Branch (202:20): [True: 0, False: 0]
  ------------------
  203|      0|        }                                                                    \
  204|      4|        if (b == -1 && a == min) {                                           \
  ------------------
  |  Branch (204:13): [True: 0, False: 4]
  |  Branch (204:24): [True: 0, False: 0]
  ------------------
  205|      0|            *err |= 1;                                                       \
  206|      0|            return max;                                                      \
  207|      0|        }                                                                    \
  208|      4|        return a / b;                                                        \
  209|      4|    }

ssl_init.c:ossl_init_ssl_base_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
ssl_init.c:ossl_init_load_ssl_strings_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
conf_mod.c:do_init_module_list_lock_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
err.c:do_err_strings_init_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
err.c:err_do_init_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
context.c:default_context_do_init_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
init.c:ossl_init_base_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
init.c:ossl_init_register_atexit_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
init.c:ossl_init_load_crypto_nodelete_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
init.c:ossl_init_load_crypto_strings_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
init.c:ossl_init_add_all_ciphers_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
init.c:ossl_init_add_all_digests_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
init.c:ossl_init_config_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
init.c:ossl_init_async_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
initthread.c:create_global_tevent_register_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \
o_names.c:o_names_init_ossl_:
   73|      2|    {                                           \
   74|      2|        init##_ossl_ret_ = init();              \
   75|      2|    }                                           \

provider_core.c:OSSL_FUNC_provider_teardown:
   52|      2|    {                                                                   \
   53|      2|        return (OSSL_FUNC_##name##_fn *)opf->function;                  \
   54|      2|    }
provider_core.c:OSSL_FUNC_provider_query_operation:
   52|      2|    {                                                                   \
   53|      2|        return (OSSL_FUNC_##name##_fn *)opf->function;                  \
   54|      2|    }

conf_mod.c:ERR_GET_REASON:
  256|      2|{
  257|      2|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  239|      2|# define ERR_SYSTEM_ERROR(errcode)      (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  218|      2|# define ERR_SYSTEM_FLAG                ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (239:41): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  258|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  219|      0|# define ERR_SYSTEM_MASK                ((unsigned int)INT_MAX)
  ------------------
  259|      2|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  230|      2|# define ERR_REASON_MASK                0X7FFFFF
  ------------------
  260|      2|}
err.c:ERR_GET_LIB:
  242|  9.61k|{
  243|  9.61k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  239|  9.61k|# define ERR_SYSTEM_ERROR(errcode)      (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  218|  9.61k|# define ERR_SYSTEM_FLAG                ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (239:41): [True: 0, False: 9.61k]
  |  |  ------------------
  ------------------
  244|      0|        return ERR_LIB_SYS;
  ------------------
  |  |   72|      0|# define ERR_LIB_SYS             2
  ------------------
  245|  9.61k|    return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  226|  9.61k|# define ERR_LIB_OFFSET                 23L
  ------------------
                  return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  227|  9.61k|# define ERR_LIB_MASK                   0xFF
  ------------------
  246|  9.61k|}
err.c:ERR_GET_REASON:
  256|     70|{
  257|     70|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  239|     70|# define ERR_SYSTEM_ERROR(errcode)      (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  218|     70|# define ERR_SYSTEM_FLAG                ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (239:41): [True: 0, False: 70]
  |  |  ------------------
  ------------------
  258|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  219|      0|# define ERR_SYSTEM_MASK                ((unsigned int)INT_MAX)
  ------------------
  259|     70|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  230|     70|# define ERR_REASON_MASK                0X7FFFFF
  ------------------
  260|     70|}
conf_def.c:ERR_GET_REASON:
  256|      2|{
  257|      2|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  239|      2|# define ERR_SYSTEM_ERROR(errcode)      (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  218|      2|# define ERR_SYSTEM_FLAG                ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (239:41): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  258|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  219|      0|# define ERR_SYSTEM_MASK                ((unsigned int)INT_MAX)
  ------------------
  259|      2|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  230|      2|# define ERR_REASON_MASK                0X7FFFFF
  ------------------
  260|      2|}

decoder_pkey.c:lh_DECODER_CACHE_ENTRY_new:
  317|      4|    { \
  318|      4|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  319|      4|                                lh_##type##_hfn_thunk, lh_##type##_cfn_thunk, \
  320|      4|                                lh_##type##_doall_thunk, \
  321|      4|                                lh_##type##_doall_arg_thunk); \
  322|      4|    } \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_doall:
  311|      4|    { \
  312|      4|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); \
  313|      4|    } \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_free:
  254|      2|    { \
  255|      2|        OPENSSL_LH_free((OPENSSL_LHASH *)lh); \
  256|      2|    } \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_flush:
  259|      2|    { \
  260|      2|        OPENSSL_LH_flush((OPENSSL_LHASH *)lh); \
  261|      2|    } \
err.c:ossl_check_ERR_STRING_DATA_lh_type:
  196|  9.55k|    { \
  197|  9.55k|        return (OPENSSL_LHASH *)lh; \
  198|  9.55k|    } \
err.c:ossl_check_ERR_STRING_DATA_lh_hashfunc_type:
  206|      2|    { \
  207|      2|        return (OPENSSL_LH_HASHFUNC)hfn; \
  208|      2|    } \
err.c:ossl_check_ERR_STRING_DATA_lh_compfunc_type:
  201|      2|    { \
  202|      2|        return (OPENSSL_LH_COMPFUNC)cmp; \
  203|      2|    } \
err.c:lh_ERR_STRING_DATA_hash_thunk:
  160|  9.54k|    { \
  161|  9.54k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn; \
  162|  9.54k|        return hfn_conv((const type *)data); \
  163|  9.54k|    } \
err.c:lh_ERR_STRING_DATA_comp_thunk:
  165|  6.15k|    { \
  166|  6.15k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn; \
  167|  6.15k|        return cfn_conv((const type *)da, (const type *)db); \
  168|  6.15k|    } \
err.c:ossl_check_ERR_STRING_DATA_lh_plain_type:
  181|  9.40k|    { \
  182|  9.40k|        return ptr; \
  183|  9.40k|    } \
err.c:ossl_check_const_ERR_STRING_DATA_lh_plain_type:
  186|    140|    { \
  187|    140|        return ptr; \
  188|    140|    } \
core_namemap.c:lh_NAMENUM_ENTRY_new:
  317|      4|    { \
  318|      4|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  319|      4|                                lh_##type##_hfn_thunk, lh_##type##_cfn_thunk, \
  320|      4|                                lh_##type##_doall_thunk, \
  321|      4|                                lh_##type##_doall_arg_thunk); \
  322|      4|    } \
core_namemap.c:lh_NAMENUM_ENTRY_doall:
  311|      2|    { \
  312|      2|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); \
  313|      2|    } \
core_namemap.c:lh_NAMENUM_ENTRY_free:
  254|      2|    { \
  255|      2|        OPENSSL_LH_free((OPENSSL_LHASH *)lh); \
  256|      2|    } \
o_names.c:lh_OBJ_NAME_new:
  317|      2|    { \
  318|      2|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  319|      2|                                lh_##type##_hfn_thunk, lh_##type##_cfn_thunk, \
  320|      2|                                lh_##type##_doall_thunk, \
  321|      2|                                lh_##type##_doall_arg_thunk); \
  322|      2|    } \
o_names.c:lh_OBJ_NAME_hfn_thunk:
  243|  1.33k|    { \
  244|  1.33k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn; \
  245|  1.33k|        return hfn_conv((const type *)data); \
  246|  1.33k|    } \
o_names.c:lh_OBJ_NAME_cfn_thunk:
  248|    848|    { \
  249|    848|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn; \
  250|    848|        return cfn_conv((const type *)da, (const type *)db); \
  251|    848|    } \
o_names.c:lh_OBJ_NAME_doall_thunk:
  299|  1.08k|    { \
  300|  1.08k|        void (*doall_conv)(type *) = (void (*)(type *))doall; \
  301|  1.08k|        doall_conv((type *)node); \
  302|  1.08k|    } \
o_names.c:lh_OBJ_NAME_insert:
  264|    848|    { \
  265|    848|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); \
  266|    848|    } \
o_names.c:lh_OBJ_NAME_error:
  279|    484|    { \
  280|    484|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh); \
  281|    484|    } \
o_names.c:lh_OBJ_NAME_delete:
  269|    484|    { \
  270|    484|        return (type *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); \
  271|    484|    } \
o_names.c:lh_OBJ_NAME_get_down_load:
  289|      8|    { \
  290|      8|        return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); \
  291|      8|    } \
o_names.c:lh_OBJ_NAME_set_down_load:
  294|     14|    { \
  295|     14|        OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); \
  296|     14|    } \
o_names.c:lh_OBJ_NAME_doall:
  311|      8|    { \
  312|      8|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); \
  313|      8|    } \
o_names.c:lh_OBJ_NAME_free:
  254|      2|    { \
  255|      2|        OPENSSL_LH_free((OPENSSL_LHASH *)lh); \
  256|      2|    } \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_doall:
  311|      2|    { \
  312|      2|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); \
  313|      2|    } \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_free:
  254|      2|    { \
  255|      2|        OPENSSL_LH_free((OPENSSL_LHASH *)lh); \
  256|      2|    } \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_new:
  317|      4|    { \
  318|      4|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  319|      4|                                lh_##type##_hfn_thunk, lh_##type##_cfn_thunk, \
  320|      4|                                lh_##type##_doall_thunk, \
  321|      4|                                lh_##type##_doall_arg_thunk); \
  322|      4|    } \
property_string.c:lh_PROPERTY_STRING_doall:
  311|      4|    { \
  312|      4|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); \
  313|      4|    } \
property_string.c:lh_PROPERTY_STRING_free:
  254|      4|    { \
  255|      4|        OPENSSL_LH_free((OPENSSL_LHASH *)lh); \
  256|      4|    } \
property_string.c:lh_PROPERTY_STRING_new:
  317|      8|    { \
  318|      8|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  319|      8|                                lh_##type##_hfn_thunk, lh_##type##_cfn_thunk, \
  320|      8|                                lh_##type##_doall_thunk, \
  321|      8|                                lh_##type##_doall_arg_thunk); \
  322|      8|    } \
property_string.c:lh_PROPERTY_STRING_hfn_thunk:
  243|     96|    { \
  244|     96|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn; \
  245|     96|        return hfn_conv((const type *)data); \
  246|     96|    } \
property_string.c:lh_PROPERTY_STRING_doall_thunk:
  299|     16|    { \
  300|     16|        void (*doall_conv)(type *) = (void (*)(type *))doall; \
  301|     16|        doall_conv((type *)node); \
  302|     16|    } \
property_string.c:lh_PROPERTY_STRING_retrieve:
  274|     64|    { \
  275|     64|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); \
  276|     64|    } \
property_string.c:lh_PROPERTY_STRING_insert:
  264|     32|    { \
  265|     32|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); \
  266|     32|    } \
property_string.c:lh_PROPERTY_STRING_error:
  279|     32|    { \
  280|     32|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh); \
  281|     32|    } \
store_register.c:lh_OSSL_STORE_LOADER_free:
  254|      2|    { \
  255|      2|        OPENSSL_LH_free((OPENSSL_LHASH *)lh); \
  256|      2|    } \

conf_mod.c:sk_CONF_IMODULE_free:
   94|      4|    { \
   95|      4|        OPENSSL_sk_free((OPENSSL_STACK *)sk); \
   96|      4|    } \
conf_mod.c:sk_CONF_MODULE_dup:
  159|      2|    { \
  160|      2|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk); \
  161|      2|    } \
conf_mod.c:sk_CONF_MODULE_new_null:
   82|      2|    { \
   83|      2|        return (STACK_OF(t1) *)OPENSSL_sk_new_null(); \
   84|      2|    } \
conf_mod.c:sk_CONF_MODULE_num:
   70|      4|    { \
   71|      4|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk); \
   72|      4|    } \
conf_mod.c:sk_CONF_MODULE_free:
   94|      6|    { \
   95|      6|        OPENSSL_sk_free((OPENSSL_STACK *)sk); \
   96|      6|    } \
conf_mod.c:sk_CONF_MODULE_pop_free:
  127|      2|    { \
  128|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
  129|      2|    } \
conf_mod.c:sk_CONF_IMODULE_num:
   70|      2|    { \
   71|      2|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk); \
   72|      2|    } \
ex_data.c:sk_EX_CALLBACK_pop_free:
  127|     36|    { \
  128|     36|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
  129|     36|    } \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_new_null:
   82|      2|    { \
   83|      2|        return (STACK_OF(t1) *)OPENSSL_sk_new_null(); \
   84|      2|    } \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_free:
   94|      2|    { \
   95|      2|        OPENSSL_sk_free((OPENSSL_STACK *)sk); \
   96|      2|    } \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_push:
  111|      2|    { \
  112|      2|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr); \
  113|      2|    } \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_num:
   70|      4|    { \
   71|      4|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk); \
   72|      4|    } \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_value:
   74|      2|    { \
   75|      2|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); \
   76|      2|    } \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_delete:
  102|      2|    { \
  103|      2|        return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); \
  104|      2|    } \
provider_conf.c:sk_OSSL_PROVIDER_pop_free:
  127|      2|    { \
  128|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
  129|      2|    } \
provider_core.c:sk_INFOPAIR_pop_free:
  127|      2|    { \
  128|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
  129|      2|    } \
provider_core.c:sk_OSSL_PROVIDER_pop_free:
  127|      2|    { \
  128|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
  129|      2|    } \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_pop_free:
  127|      2|    { \
  128|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
  129|      2|    } \
provider_core.c:sk_OSSL_PROVIDER_new:
   78|      4|    { \
   79|      4|        return (STACK_OF(t1) *)OPENSSL_sk_new((OPENSSL_sk_compfunc)compare); \
   80|      4|    } \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_new_null:
   82|      4|    { \
   83|      4|        return (STACK_OF(t1) *)OPENSSL_sk_new_null(); \
   84|      4|    } \
provider_core.c:sk_OSSL_PROVIDER_sort:
  151|      2|    { \
  152|      2|        OPENSSL_sk_sort((OPENSSL_STACK *)sk); \
  153|      2|    } \
provider_core.c:sk_OSSL_PROVIDER_find:
  139|      4|    { \
  140|      4|        return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr); \
  141|      4|    } \
provider_core.c:sk_INFOPAIR_deep_copy:
  165|      2|    { \
  166|      2|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk, \
  167|      2|                                            (OPENSSL_sk_copyfunc)copyfunc, \
  168|      2|                                            (OPENSSL_sk_freefunc)freefunc); \
  169|      2|    } \
provider_core.c:sk_OSSL_PROVIDER_push:
  111|      2|    { \
  112|      2|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr); \
  113|      2|    } \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_num:
   70|      4|    { \
   71|      4|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk); \
   72|      4|    } \
o_names.c:sk_NAME_FUNCS_pop_free:
  127|      2|    { \
  128|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
  129|      2|    } \
obj_xref.c:sk_nid_triple_pop_free:
  127|      2|    { \
  128|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
  129|      2|    } \
obj_xref.c:sk_nid_triple_free:
   94|      2|    { \
   95|      2|        OPENSSL_sk_free((OPENSSL_STACK *)sk); \
   96|      2|    } \
property_string.c:ossl_check_OPENSSL_CSTRING_sk_type:
   48|     36|    { \
   49|     36|        return (OPENSSL_STACK *)sk; \
   50|     36|    } \
property_string.c:ossl_check_OPENSSL_CSTRING_type:
   40|     32|    { \
   41|     32|        return ptr; \
   42|     32|    } \
evp_pbe.c:sk_EVP_PBE_CTL_pop_free:
  127|      2|    { \
  128|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
  129|      2|    } \
comp_methods.c:ossl_check_SSL_COMP_compfunc_type:
   52|      4|    { \
   53|      4|        return (OPENSSL_sk_compfunc)cmp; \
   54|      4|    } \
comp_methods.c:ossl_check_SSL_COMP_sk_type:
   48|      2|    { \
   49|      2|        return (OPENSSL_STACK *)sk; \
   50|      2|    } \
comp_methods.c:ossl_check_SSL_COMP_freefunc_type:
   60|      2|    { \
   61|      2|        return (OPENSSL_sk_freefunc)fr; \
   62|      2|    }

ossl_err_load_PROV_strings:
  230|      2|{
  231|      2|#ifndef OPENSSL_NO_ERR
  232|      2|    if (ERR_reason_error_string(PROV_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (232:9): [True: 2, False: 0]
  ------------------
  233|      2|        ERR_load_strings_const(PROV_str_reasons);
  234|      2|#endif
  235|      2|    return 1;
  236|      2|}

ossl_prov_drbg_nonce_ctx_new:
  282|      4|{
  283|      4|    PROV_DRBG_NONCE_GLOBAL *dngbl = OPENSSL_zalloc(sizeof(*dngbl));
  ------------------
  |  |  104|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      4|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      4|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  284|       |
  285|      4|    if (dngbl == NULL)
  ------------------
  |  Branch (285:9): [True: 0, False: 4]
  ------------------
  286|      0|        return NULL;
  287|       |
  288|      4|    dngbl->rand_nonce_lock = CRYPTO_THREAD_lock_new();
  289|      4|    if (dngbl->rand_nonce_lock == NULL) {
  ------------------
  |  Branch (289:9): [True: 0, False: 4]
  ------------------
  290|      0|        OPENSSL_free(dngbl);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  291|      0|        return NULL;
  292|      0|    }
  293|       |
  294|      4|    return dngbl;
  295|      4|}
ossl_prov_drbg_nonce_ctx_free:
  298|      2|{
  299|      2|    PROV_DRBG_NONCE_GLOBAL *dngbl = vdngbl;
  300|       |
  301|      2|    if (dngbl == NULL)
  ------------------
  |  Branch (301:9): [True: 0, False: 2]
  ------------------
  302|      0|        return;
  303|       |
  304|      2|    CRYPTO_THREAD_lock_free(dngbl->rand_nonce_lock);
  305|       |
  306|      2|    OPENSSL_free(dngbl);
  ------------------
  |  |  115|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  307|      2|}

ossl_pqueue_push:
  198|  1.14M|{
  199|  1.14M|    size_t n, m;
  200|       |
  201|  1.14M|    if (!ossl_pqueue_reserve(pq, 1))
  ------------------
  |  Branch (201:9): [True: 0, False: 1.14M]
  ------------------
  202|      0|        return 0;
  203|       |
  204|  1.14M|    n = pq->htop++;
  205|  1.14M|    m = pq->freelist;
  206|  1.14M|    pq->freelist = pq->elements[m].posn;
  207|       |
  208|  1.14M|    pq->heap[n].data = data;
  209|  1.14M|    pq->heap[n].index = m;
  210|       |
  211|  1.14M|    pq->elements[m].posn = n;
  212|  1.14M|#ifndef NDEBUG
  213|  1.14M|    pq->elements[m].used = 1;
  214|  1.14M|#endif
  215|  1.14M|    pqueue_move_down(pq, n);
  216|  1.14M|    if (elem != NULL)
  ------------------
  |  Branch (216:9): [True: 1.14M, False: 0]
  ------------------
  217|  1.14M|        *elem = m;
  218|  1.14M|    return 1;
  219|  1.14M|}
ossl_pqueue_peek:
  222|  2.20M|{
  223|  2.20M|    if (pq->htop > 0) {
  ------------------
  |  Branch (223:9): [True: 585k, False: 1.62M]
  ------------------
  224|   585k|        ASSERT_USED(pq, 0);
  ------------------
  |  |   69|   585k|    assert(pq->elements[pq->heap[idx].index].used);                         \
  |  |   70|   585k|    assert(pq->elements[pq->heap[idx].index].posn == idx)
  ------------------
  225|   585k|        return pq->heap->data;
  226|   585k|    }
  227|  1.62M|    return NULL;
  228|  2.20M|}
ossl_pqueue_pop:
  231|  1.65M|{
  232|  1.65M|    void *res;
  233|  1.65M|    size_t elem;
  234|       |
  235|  1.65M|    if (pq == NULL || pq->htop == 0)
  ------------------
  |  Branch (235:9): [True: 0, False: 1.65M]
  |  Branch (235:23): [True: 569k, False: 1.08M]
  ------------------
  236|   569k|        return NULL;
  237|       |
  238|  2.16M|    ASSERT_USED(pq, 0);
  ------------------
  |  |   69|  1.65M|    assert(pq->elements[pq->heap[idx].index].used);                         \
  |  |   70|  1.08M|    assert(pq->elements[pq->heap[idx].index].posn == idx)
  ------------------
  239|  1.08M|    res = pq->heap->data;
  240|  1.08M|    elem = pq->heap->index;
  241|       |
  242|  1.08M|    if (--pq->htop != 0) {
  ------------------
  |  Branch (242:9): [True: 1.07M, False: 3.43k]
  ------------------
  243|  1.07M|        pqueue_move_elem(pq, pq->htop, 0);
  244|  1.07M|        pqueue_move_up(pq, 0);
  245|  1.07M|    }
  246|       |
  247|  1.08M|    pq->elements[elem].posn = pq->freelist;
  248|  1.08M|    pq->freelist = elem;
  249|  1.08M|#ifndef NDEBUG
  250|  1.08M|    pq->elements[elem].used = 0;
  251|  1.08M|#endif
  252|  1.08M|    return res;
  253|  2.16M|}
ossl_pqueue_remove:
  256|   576k|{
  257|   576k|    size_t n;
  258|       |
  259|   576k|    if (pq == NULL || elem >= pq->hmax || pq->htop == 0)
  ------------------
  |  Branch (259:9): [True: 0, False: 576k]
  |  Branch (259:23): [True: 0, False: 576k]
  |  Branch (259:43): [True: 0, False: 576k]
  ------------------
  260|      0|        return 0;
  261|       |
  262|   576k|    ASSERT_ELEM_USED(pq, elem);
  ------------------
  |  |   72|   576k|    assert(pq->elements[elem].used)
  ------------------
  263|   576k|    n = pq->elements[elem].posn;
  264|       |
  265|   576k|    ASSERT_USED(pq, n);
  ------------------
  |  |   69|   576k|    assert(pq->elements[pq->heap[idx].index].used);                         \
  |  |   70|   576k|    assert(pq->elements[pq->heap[idx].index].posn == idx)
  ------------------
  266|       |
  267|   576k|    if (n == pq->htop - 1) {
  ------------------
  |  Branch (267:9): [True: 62.9k, False: 513k]
  ------------------
  268|  62.9k|        pq->elements[elem].posn = pq->freelist;
  269|  62.9k|        pq->freelist = elem;
  270|  62.9k|#ifndef NDEBUG
  271|  62.9k|        pq->elements[elem].used = 0;
  272|  62.9k|#endif
  273|  62.9k|        return pq->heap[--pq->htop].data;
  274|  62.9k|    }
  275|   513k|    if (n > 0)
  ------------------
  |  Branch (275:9): [True: 0, False: 513k]
  ------------------
  276|      0|        pqueue_force_bottom(pq, n);
  277|   513k|    return ossl_pqueue_pop(pq);
  278|   576k|}
ossl_pqueue_reserve:
  296|  1.14M|{
  297|  1.14M|    size_t new_max, cur_max;
  298|  1.14M|    struct pq_heap_st *h;
  299|  1.14M|    struct pq_elem_st *e;
  300|       |
  301|  1.14M|    if (pq == NULL)
  ------------------
  |  Branch (301:9): [True: 0, False: 1.14M]
  ------------------
  302|      0|        return 0;
  303|  1.14M|    cur_max = pq->hmax;
  304|  1.14M|    if (pq->htop + n < cur_max)
  ------------------
  |  Branch (304:9): [True: 1.13M, False: 6.60k]
  ------------------
  305|  1.13M|        return 1;
  306|       |
  307|  6.60k|    new_max = compute_pqueue_growth(n + cur_max, cur_max);
  308|  6.60k|    if (new_max == 0) {
  ------------------
  |  Branch (308:9): [True: 0, False: 6.60k]
  ------------------
  309|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  310|      0|        return 0;
  311|      0|    }
  312|       |
  313|  6.60k|    h = OPENSSL_realloc(pq->heap, new_max * sizeof(*pq->heap));
  ------------------
  |  |  109|  6.60k|        CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|  6.60k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|  6.60k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  314|  6.60k|    if (h == NULL)
  ------------------
  |  Branch (314:9): [True: 0, False: 6.60k]
  ------------------
  315|      0|        return 0;
  316|  6.60k|    pq->heap = h;
  317|       |
  318|  6.60k|    e = OPENSSL_realloc(pq->elements, new_max * sizeof(*pq->elements));
  ------------------
  |  |  109|  6.60k|        CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|  6.60k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|  6.60k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  319|  6.60k|    if (e == NULL)
  ------------------
  |  Branch (319:9): [True: 0, False: 6.60k]
  ------------------
  320|      0|        return 0;
  321|  6.60k|    pq->elements = e;
  322|       |
  323|  6.60k|    pq->hmax = new_max;
  324|  6.60k|    pqueue_add_freelist(pq, cur_max);
  325|  6.60k|    return 1;
  326|  6.60k|}
ossl_pqueue_new:
  329|   569k|{
  330|   569k|    OSSL_PQUEUE *pq;
  331|       |
  332|   569k|    if (compare == NULL)
  ------------------
  |  Branch (332:9): [True: 0, False: 569k]
  ------------------
  333|      0|        return NULL;
  334|       |
  335|   569k|    pq = OPENSSL_malloc(sizeof(*pq));
  ------------------
  |  |  102|   569k|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|   569k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|   569k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  336|   569k|    if (pq == NULL)
  ------------------
  |  Branch (336:9): [True: 0, False: 569k]
  ------------------
  337|      0|        return NULL;
  338|   569k|    pq->compare = compare;
  339|   569k|    pq->hmax = min_nodes;
  340|   569k|    pq->htop = 0;
  341|   569k|    pq->freelist = 0;
  342|   569k|    pq->heap = OPENSSL_malloc(sizeof(*pq->heap) * min_nodes);
  ------------------
  |  |  102|   569k|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|   569k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|   569k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  343|   569k|    pq->elements = OPENSSL_malloc(sizeof(*pq->elements) * min_nodes);
  ------------------
  |  |  102|   569k|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|   569k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|   569k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  344|   569k|    if (pq->heap == NULL || pq->elements == NULL) {
  ------------------
  |  Branch (344:9): [True: 0, False: 569k]
  |  Branch (344:29): [True: 0, False: 569k]
  ------------------
  345|      0|        ossl_pqueue_free(pq);
  346|      0|        return NULL;
  347|      0|    }
  348|   569k|    pqueue_add_freelist(pq, 0);
  349|   569k|    return pq;
  350|   569k|}
ossl_pqueue_free:
  353|   569k|{
  354|   569k|    if (pq != NULL) {
  ------------------
  |  Branch (354:9): [True: 569k, False: 0]
  ------------------
  355|   569k|        OPENSSL_free(pq->heap);
  ------------------
  |  |  115|   569k|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|   569k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|   569k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  356|   569k|        OPENSSL_free(pq->elements);
  ------------------
  |  |  115|   569k|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|   569k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|   569k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  357|   569k|        OPENSSL_free(pq);
  ------------------
  |  |  115|   569k|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|   569k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|   569k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  358|   569k|    }
  359|   569k|}
ossl_pqueue_num:
  373|  1.43M|{
  374|  1.43M|    return pq != NULL ? pq->htop : 0;
  ------------------
  |  Branch (374:12): [True: 1.43M, False: 0]
  ------------------
  375|  1.43M|}
priority_queue.c:pqueue_move_down:
  153|  1.14M|{
  154|  1.14M|    struct pq_heap_st *h = pq->heap;
  155|       |
  156|  1.14M|    ASSERT_USED(pq, n);
  ------------------
  |  |   69|  1.14M|    assert(pq->elements[pq->heap[idx].index].used);                         \
  |  |   70|  1.14M|    assert(pq->elements[pq->heap[idx].index].posn == idx)
  ------------------
  157|  1.83M|    while (n > 0) {
  ------------------
  |  Branch (157:12): [True: 1.76M, False: 70.9k]
  ------------------
  158|  1.76M|        const size_t p = (n - 1) / 2;
  159|       |
  160|  1.76M|        ASSERT_USED(pq, p);
  ------------------
  |  |   69|  1.76M|    assert(pq->elements[pq->heap[idx].index].used);                         \
  |  |   70|  1.76M|    assert(pq->elements[pq->heap[idx].index].posn == idx)
  ------------------
  161|  1.76M|        if (pq->compare(h[n].data, h[p].data) >= 0)
  ------------------
  |  Branch (161:13): [True: 1.07M, False: 686k]
  ------------------
  162|  1.07M|            break;
  163|   686k|        pqueue_swap_elem(pq, n, p);
  164|   686k|        n = p;
  165|   686k|    }
  166|  1.14M|}
priority_queue.c:pqueue_swap_elem:
  106|  8.20M|{
  107|  8.20M|    struct pq_heap_st *h = pq->heap, t_h;
  108|  8.20M|    struct pq_elem_st *e = pq->elements;
  109|       |
  110|  8.20M|    ASSERT_USED(pq, i);
  ------------------
  |  |   69|  8.20M|    assert(pq->elements[pq->heap[idx].index].used);                         \
  |  |   70|  8.20M|    assert(pq->elements[pq->heap[idx].index].posn == idx)
  ------------------
  111|  16.4M|    ASSERT_USED(pq, j);
  ------------------
  |  |   69|  8.20M|    assert(pq->elements[pq->heap[idx].index].used);                         \
  |  |   70|  8.20M|    assert(pq->elements[pq->heap[idx].index].posn == idx)
  ------------------
  112|       |
  113|  8.20M|    t_h = h[i];
  114|  8.20M|    h[i] = h[j];
  115|  8.20M|    h[j] = t_h;
  116|       |
  117|  8.20M|    e[h[i].index].posn = i;
  118|  8.20M|    e[h[j].index].posn = j;
  119|  8.20M|}
priority_queue.c:pqueue_move_elem:
  122|  1.07M|{
  123|  1.07M|    struct pq_heap_st *h = pq->heap;
  124|  1.07M|    struct pq_elem_st *e = pq->elements;
  125|       |
  126|  1.07M|    ASSERT_USED(pq, from);
  ------------------
  |  |   69|  1.07M|    assert(pq->elements[pq->heap[idx].index].used);                         \
  |  |   70|  1.07M|    assert(pq->elements[pq->heap[idx].index].posn == idx)
  ------------------
  127|       |
  128|  1.07M|    h[to] = h[from];
  129|  1.07M|    e[h[to].index].posn = to;
  130|  1.07M|}
priority_queue.c:pqueue_move_up:
  173|  1.07M|{
  174|  1.07M|    struct pq_heap_st *h = pq->heap;
  175|  1.07M|    size_t p = n * 2 + 1;
  176|       |
  177|  1.07M|    ASSERT_USED(pq, n);
  ------------------
  |  |   69|  1.07M|    assert(pq->elements[pq->heap[idx].index].used);                         \
  |  |   70|  1.07M|    assert(pq->elements[pq->heap[idx].index].posn == idx)
  ------------------
  178|  1.07M|    if (pq->htop > p + 1) {
  ------------------
  |  Branch (178:9): [True: 1.06M, False: 11.6k]
  ------------------
  179|  1.06M|        ASSERT_USED(pq, p);
  ------------------
  |  |   69|  1.06M|    assert(pq->elements[pq->heap[idx].index].used);                         \
  |  |   70|  1.06M|    assert(pq->elements[pq->heap[idx].index].posn == idx)
  ------------------
  180|  2.13M|        ASSERT_USED(pq, p + 1);
  ------------------
  |  |   69|  1.06M|    assert(pq->elements[pq->heap[idx].index].used);                         \
  |  |   70|  1.06M|    assert(pq->elements[pq->heap[idx].index].posn == idx)
  ------------------
  181|  1.06M|        if (pq->compare(h[p].data, h[p + 1].data) > 0)
  ------------------
  |  Branch (181:13): [True: 263k, False: 803k]
  ------------------
  182|   263k|            p++;
  183|  1.06M|    }
  184|  8.59M|    while (pq->htop > p && pq->compare(h[p].data, h[n].data) < 0) {
  ------------------
  |  Branch (184:12): [True: 8.12M, False: 469k]
  |  Branch (184:28): [True: 7.51M, False: 609k]
  ------------------
  185|  7.51M|        ASSERT_USED(pq, p);
  ------------------
  |  |   69|  7.51M|    assert(pq->elements[pq->heap[idx].index].used);                         \
  |  |   70|  7.51M|    assert(pq->elements[pq->heap[idx].index].posn == idx)
  ------------------
  186|  7.51M|        pqueue_swap_elem(pq, n, p);
  187|  7.51M|        n = p;
  188|  7.51M|        p = n * 2 + 1;
  189|  7.51M|        if (pq->htop > p + 1) {
  ------------------
  |  Branch (189:13): [True: 7.04M, False: 467k]
  ------------------
  190|  7.04M|            ASSERT_USED(pq, p + 1);
  ------------------
  |  |   69|  7.04M|    assert(pq->elements[pq->heap[idx].index].used);                         \
  |  |   70|  7.04M|    assert(pq->elements[pq->heap[idx].index].posn == idx)
  ------------------
  191|  7.04M|            if (pq->compare(h[p].data, h[p + 1].data) > 0)
  ------------------
  |  Branch (191:17): [True: 3.31M, False: 3.73M]
  ------------------
  192|  3.31M|                p++;
  193|  7.04M|        }
  194|  7.51M|    }
  195|  1.07M|}
priority_queue.c:compute_pqueue_growth:
   89|  6.60k|{
   90|  6.60k|    int err = 0;
   91|       |
   92|  13.2k|    while (current < target) {
  ------------------
  |  Branch (92:12): [True: 6.60k, False: 6.60k]
  ------------------
   93|  6.60k|        if (current >= max_nodes)
  ------------------
  |  Branch (93:13): [True: 0, False: 6.60k]
  ------------------
   94|      0|            return 0;
   95|       |
   96|  6.60k|        current = safe_muldiv_size_t(current, 8, 5, &err);
   97|  6.60k|        if (err)
  ------------------
  |  Branch (97:13): [True: 0, False: 6.60k]
  ------------------
   98|      0|            return 0;
   99|  6.60k|        if (current >= max_nodes)
  ------------------
  |  Branch (99:13): [True: 0, False: 6.60k]
  ------------------
  100|      0|            current = max_nodes;
  101|  6.60k|    }
  102|  6.60k|    return current;
  103|  6.60k|}
priority_queue.c:pqueue_add_freelist:
  281|   576k|{
  282|   576k|    struct pq_elem_st *e = pq->elements;
  283|   576k|    size_t i;
  284|       |
  285|   576k|#ifndef NDEBUG
  286|  6.25M|    for (i = from; i < pq->hmax; i++)
  ------------------
  |  Branch (286:20): [True: 5.67M, False: 576k]
  ------------------
  287|  5.67M|        e[i].used = 0;
  288|   576k|#endif
  289|   576k|    e[from].posn = pq->freelist;
  290|  5.67M|    for (i = from + 1; i < pq->hmax; i++)
  ------------------
  |  Branch (290:24): [True: 5.10M, False: 576k]
  ------------------
  291|  5.10M|        e[i].posn = i - 1;
  292|   576k|    pq->freelist = pq->hmax - 1;
  293|   576k|}

ossl_quic_rcidm_new:
  282|   569k|{
  283|   569k|    QUIC_RCIDM *rcidm;
  284|       |
  285|   569k|    if ((rcidm = OPENSSL_zalloc(sizeof(*rcidm))) == NULL)
  ------------------
  |  |  104|   569k|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|   569k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|   569k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (285:9): [True: 0, False: 569k]
  ------------------
  286|      0|        return NULL;
  287|       |
  288|   569k|    if ((rcidm->rcids = ossl_pqueue_RCID_new(rcid_cmp)) == NULL) {
  ------------------
  |  Branch (288:9): [True: 0, False: 569k]
  ------------------
  289|      0|        OPENSSL_free(rcidm);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  290|      0|        return NULL;
  291|      0|    }
  292|       |
  293|   569k|    if (initial_odcid != NULL) {
  ------------------
  |  Branch (293:9): [True: 557k, False: 12.0k]
  ------------------
  294|   557k|        rcidm->initial_odcid        = *initial_odcid;
  295|   557k|        rcidm->added_initial_odcid  = 1;
  296|   557k|    }
  297|       |
  298|   569k|    rcidm_update(rcidm);
  299|   569k|    return rcidm;
  300|   569k|}
ossl_quic_rcidm_free:
  303|   569k|{
  304|   569k|    RCID *rcid, *rnext;
  305|       |
  306|   569k|    if (rcidm == NULL)
  ------------------
  |  Branch (306:9): [True: 0, False: 569k]
  ------------------
  307|      0|        return;
  308|       |
  309|   569k|    OPENSSL_free(rcidm->cur_rcid);
  ------------------
  |  |  115|   569k|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|   569k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|   569k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  310|  1.13M|    while ((rcid = ossl_pqueue_RCID_pop(rcidm->rcids)) != NULL)
  ------------------
  |  Branch (310:12): [True: 568k, False: 569k]
  ------------------
  311|   568k|        OPENSSL_free(rcid);
  ------------------
  |  |  115|  1.13M|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|   568k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|   568k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  312|       |
  313|   569k|    LIST_FOREACH_DELSAFE(rcid, rnext, retiring, &rcidm->retiring_list)
  ------------------
  |  |   42|   569k|    LIST_FOREACH_DELSAFE_FROM(p, pn, name, ossl_list_##name##_head(l))
  |  |  ------------------
  |  |  |  |   38|   569k|    for ((p) = (init);                                                      \
  |  |  |  |   39|  1.42M|         (p) != NULL && (((pn) = ossl_list_##name##_next(p)), 1);           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:10): [True: 855k, False: 569k]
  |  |  |  |  |  Branch (39:25): [True: 855k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   40|   855k|         (p) = (pn))
  |  |  ------------------
  ------------------
  314|   855k|        OPENSSL_free(rcid);
  ------------------
  |  |  115|  1.42M|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|   855k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|   855k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  315|       |
  316|   569k|    ossl_pqueue_RCID_free(rcidm->rcids);
  317|   569k|    OPENSSL_free(rcidm);
  ------------------
  |  |  115|   569k|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|   569k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|   569k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  318|   569k|}
ossl_quic_rcidm_on_handshake_complete:
  553|  13.3k|{
  554|  13.3k|    if (rcidm->handshake_complete)
  ------------------
  |  Branch (554:9): [True: 9.35k, False: 3.94k]
  ------------------
  555|  9.35k|        return;
  556|       |
  557|  3.94k|    rcidm->handshake_complete = 1;
  558|  3.94k|    rcidm_tick(rcidm);
  559|  3.94k|}
ossl_quic_rcidm_on_packet_sent:
  562|  9.06k|{
  563|  9.06k|    if (num_packets == 0)
  ------------------
  |  Branch (563:9): [True: 256, False: 8.81k]
  ------------------
  564|    256|        return;
  565|       |
  566|  8.81k|    rcidm->packets_sent += num_packets;
  567|  8.81k|    rcidm_tick(rcidm);
  568|  8.81k|}
ossl_quic_rcidm_request_roll:
  571|   699k|{
  572|   699k|    rcidm->roll_requested = 1;
  573|   699k|    rcidm_tick(rcidm);
  574|   699k|}
ossl_quic_rcidm_add_from_initial:
  582|  8.86k|{
  583|  8.86k|    RCID *rcid_obj;
  584|       |
  585|  8.86k|    if (rcidm->added_initial_rcid || rcidm->handshake_complete)
  ------------------
  |  Branch (585:9): [True: 1.90k, False: 6.96k]
  |  Branch (585:38): [True: 2.10k, False: 4.85k]
  ------------------
  586|  4.00k|        return 0;
  587|       |
  588|  4.85k|    rcid_obj = rcidm_create_rcid(rcidm, INITIAL_SEQ_NUM,
  ------------------
  |  |   42|  4.85k|#define INITIAL_SEQ_NUM         0
  ------------------
  589|  4.85k|                                 rcid, RCID_TYPE_INITIAL);
  590|  4.85k|    if (rcid_obj == NULL)
  ------------------
  |  Branch (590:9): [True: 1.31k, False: 3.54k]
  ------------------
  591|  1.31k|        return 0;
  592|       |
  593|  3.54k|    rcidm->added_initial_rcid = 1;
  594|  3.54k|    rcidm_tick(rcidm);
  595|  3.54k|    return 1;
  596|  4.85k|}
ossl_quic_rcidm_add_from_server_retry:
  600|  7.85k|{
  601|  7.85k|    if (rcidm->added_retry_odcid || rcidm->handshake_complete)
  ------------------
  |  Branch (601:9): [True: 4.39k, False: 3.46k]
  |  Branch (601:37): [True: 1.11k, False: 2.34k]
  ------------------
  602|  5.51k|        return 0;
  603|       |
  604|  2.34k|    rcidm->retry_odcid          = *retry_odcid;
  605|  2.34k|    rcidm->added_retry_odcid    = 1;
  606|  2.34k|    rcidm_tick(rcidm);
  607|  2.34k|    return 1;
  608|  7.85k|}
ossl_quic_rcidm_add_from_ncid:
  612|  1.43M|{
  613|  1.43M|    RCID *rcid;
  614|       |
  615|  1.43M|    rcid = rcidm_create_rcid(rcidm, ncid->seq_num, &ncid->conn_id, RCID_TYPE_NCID);
  616|  1.43M|    if (rcid == NULL)
  ------------------
  |  Branch (616:9): [True: 6.94k, False: 1.42M]
  ------------------
  617|  6.94k|        return 0;
  618|       |
  619|  1.42M|    rcidm_handle_retire_prior_to(rcidm, ncid->retire_prior_to);
  620|  1.42M|    rcidm_tick(rcidm);
  621|  1.42M|    return 1;
  622|  1.43M|}
ossl_quic_rcidm_pop_retire_seq_num:
  647|  7.32k|{
  648|  7.32k|    return rcidm_get_retire(rcidm, seq_num, /*peek=*/0);
  649|  7.32k|}
ossl_quic_rcidm_peek_retire_seq_num:
  653|  1.94k|{
  654|  1.94k|    return rcidm_get_retire(rcidm, seq_num, /*peek=*/1);
  655|  1.94k|}
ossl_quic_rcidm_get_preferred_tx_dcid:
  659|  4.21k|{
  660|  4.21k|    if (!rcidm->have_preferred_rcid)
  ------------------
  |  Branch (660:9): [True: 419, False: 3.80k]
  ------------------
  661|    419|        return 0;
  662|       |
  663|  3.80k|    *tx_dcid = rcidm->preferred_rcid;
  664|  3.80k|    return 1;
  665|  4.21k|}
ossl_quic_rcidm_get_preferred_tx_dcid_changed:
  669|  41.2k|{
  670|  41.2k|    int r = rcidm->preferred_rcid_changed;
  671|       |
  672|  41.2k|    if (clear)
  ------------------
  |  Branch (672:9): [True: 40.7k, False: 458]
  ------------------
  673|  40.7k|        rcidm->preferred_rcid_changed = 0;
  674|       |
  675|  41.2k|    return r;
  676|  41.2k|}
quic_rcidm.c:rcid_cmp:
  273|  18.0M|{
  274|  18.0M|    if (a->seq_num < b->seq_num)
  ------------------
  |  Branch (274:9): [True: 8.52M, False: 9.48M]
  ------------------
  275|  8.52M|        return -1;
  276|  9.48M|    if (a->seq_num > b->seq_num)
  ------------------
  |  Branch (276:9): [True: 3.98M, False: 5.49M]
  ------------------
  277|  3.98M|        return 1;
  278|  5.49M|    return 0;
  279|  9.48M|}
quic_rcidm.c:rcidm_update:
  490|  2.71M|{
  491|  2.71M|    RCID *rcid;
  492|       |
  493|       |    /*
  494|       |     * If we have no current numbered RCID but have one or more pending, use it.
  495|       |     */
  496|  2.71M|    if (rcidm->cur_rcid == NULL
  ------------------
  |  Branch (496:9): [True: 1.00M, False: 1.71M]
  ------------------
  497|  2.71M|        && (rcid = ossl_pqueue_RCID_peek(rcidm->rcids)) != NULL) {
  ------------------
  |  Branch (497:12): [True: 9.25k, False: 997k]
  ------------------
  498|  9.25k|        rcidm_transition_rcid(rcidm, rcid, RCID_STATE_CUR);
  499|  9.25k|        assert(rcidm->cur_rcid != NULL);
  500|  9.25k|    }
  501|       |
  502|       |    /* Prefer use of any current numbered RCID we have, if possible. */
  503|  2.71M|    if (rcidm->cur_rcid != NULL) {
  ------------------
  |  Branch (503:9): [True: 1.71M, False: 997k]
  ------------------
  504|  1.71M|        rcidm_check_rcid(rcidm, rcidm->cur_rcid);
  505|  1.71M|        rcidm_set_preferred_rcid(rcidm, &rcidm->cur_rcid->cid);
  506|  1.71M|        return;
  507|  1.71M|    }
  508|       |
  509|       |    /*
  510|       |     * If there are no RCIDs from NCID frames we can use, go through the various
  511|       |     * kinds of bootstrapping RCIDs we can use in order of priority.
  512|       |     */
  513|   997k|    if (rcidm->added_retry_odcid && !rcidm->handshake_complete) {
  ------------------
  |  Branch (513:9): [True: 294k, False: 703k]
  |  Branch (513:37): [True: 3.27k, False: 290k]
  ------------------
  514|  3.27k|        rcidm_set_preferred_rcid(rcidm, &rcidm->retry_odcid);
  515|  3.27k|        return;
  516|  3.27k|    }
  517|       |
  518|   994k|    if (rcidm->added_initial_odcid && !rcidm->handshake_complete) {
  ------------------
  |  Branch (518:9): [True: 616k, False: 377k]
  |  Branch (518:39): [True: 573k, False: 42.6k]
  ------------------
  519|   573k|        rcidm_set_preferred_rcid(rcidm, &rcidm->initial_odcid);
  520|   573k|        return;
  521|   573k|    }
  522|       |
  523|       |    /* We don't know of any usable RCIDs */
  524|   420k|    rcidm_set_preferred_rcid(rcidm, NULL);
  525|   420k|}
quic_rcidm.c:rcidm_transition_rcid:
  381|   848k|{
  382|   848k|    unsigned int old_state = rcid->state;
  383|       |
  384|   848k|    assert(state >= old_state && state <= RCID_STATE_RETIRING);
  385|   848k|    rcidm_check_rcid(rcidm, rcid);
  386|   848k|    if (state == old_state)
  ------------------
  |  Branch (386:9): [True: 0, False: 848k]
  ------------------
  387|      0|        return;
  388|       |
  389|   848k|    if (rcidm->cur_rcid != NULL && state == RCID_STATE_CUR) {
  ------------------
  |  Branch (389:9): [True: 545k, False: 303k]
  |  Branch (389:36): [True: 269k, False: 275k]
  ------------------
  390|   269k|        rcidm_transition_rcid(rcidm, rcidm->cur_rcid, RCID_STATE_RETIRING);
  391|   269k|        assert(rcidm->cur_rcid == NULL);
  392|   269k|    }
  393|       |
  394|   848k|    if (old_state == RCID_STATE_PENDING) {
  ------------------
  |  Branch (394:9): [True: 576k, False: 272k]
  ------------------
  395|   576k|        ossl_pqueue_RCID_remove(rcidm->rcids, rcid->pq_idx);
  396|   576k|        rcid->pq_idx = SIZE_MAX;
  397|   576k|    }
  398|       |
  399|   848k|    rcid->state = state;
  400|       |
  401|   848k|    if (state == RCID_STATE_CUR) {
  ------------------
  |  Branch (401:9): [True: 280k, False: 568k]
  ------------------
  402|   280k|        rcidm->cur_rcid = rcid;
  403|   568k|    } else if (state == RCID_STATE_RETIRING) {
  ------------------
  |  Branch (403:16): [True: 568k, False: 0]
  ------------------
  404|   568k|        if (old_state == RCID_STATE_CUR)
  ------------------
  |  Branch (404:13): [True: 272k, False: 296k]
  ------------------
  405|   272k|            rcidm->cur_rcid = NULL;
  406|       |
  407|   568k|        ossl_list_retiring_insert_tail(&rcidm->retiring_list, rcid);
  408|   568k|        ++rcidm->num_retiring;
  409|   568k|    }
  410|       |
  411|   848k|    rcidm_check_rcid(rcidm, rcid);
  412|   848k|}
quic_rcidm.c:rcidm_check_rcid:
  250|  4.85M|{
  251|  4.85M|    assert(rcid->state == RCID_STATE_PENDING
  252|  4.85M|           || rcid->state == RCID_STATE_CUR
  253|  4.85M|           || rcid->state == RCID_STATE_RETIRING);
  254|  4.85M|    assert((rcid->state == RCID_STATE_PENDING)
  255|  4.85M|           == (rcid->pq_idx != SIZE_MAX));
  256|  4.85M|    assert((rcid->state == RCID_STATE_CUR)
  257|  4.85M|           == (rcidm->cur_rcid == rcid));
  258|  4.85M|    assert((ossl_list_retiring_next(rcid) != NULL
  259|  4.85M|            || ossl_list_retiring_prev(rcid) != NULL
  260|  4.85M|            || ossl_list_retiring_head(&rcidm->retiring_list) == rcid)
  261|  4.85M|           == (rcid->state == RCID_STATE_RETIRING));
  262|  4.85M|    assert(rcid->type != RCID_TYPE_INITIAL || rcid->seq_num == 0);
  263|  4.85M|    assert(rcid->type != RCID_TYPE_PREF_ADDR || rcid->seq_num == 1);
  264|  4.85M|    assert(rcid->seq_num <= OSSL_QUIC_VLINT_MAX);
  265|  4.85M|    assert(rcid->cid.id_len > 0 && rcid->cid.id_len <= QUIC_MAX_CONN_ID_LEN);
  266|  4.85M|    assert(rcid->seq_num >= rcidm->retire_prior_to
  267|  4.85M|            || rcid->state == RCID_STATE_RETIRING);
  268|  4.85M|    assert(rcidm->num_changes == 0 || rcidm->handshake_complete);
  269|  4.85M|    assert(rcid->state != RCID_STATE_RETIRING || rcidm->num_retiring > 0);
  270|  4.85M|}
quic_rcidm.c:rcidm_set_preferred_rcid:
  322|  2.71M|{
  323|  2.71M|    if (rcid == NULL) {
  ------------------
  |  Branch (323:9): [True: 420k, False: 2.29M]
  ------------------
  324|   420k|        rcidm->preferred_rcid_changed   = 1;
  325|   420k|        rcidm->have_preferred_rcid      = 0;
  326|   420k|        return;
  327|   420k|    }
  328|       |
  329|  2.29M|    if (ossl_quic_conn_id_eq(&rcidm->preferred_rcid, rcid))
  ------------------
  |  Branch (329:9): [True: 2.22M, False: 70.9k]
  ------------------
  330|  2.22M|        return;
  331|       |
  332|  70.9k|    rcidm->preferred_rcid           = *rcid;
  333|  70.9k|    rcidm->preferred_rcid_changed   = 1;
  334|  70.9k|    rcidm->have_preferred_rcid      = 1;
  335|  70.9k|}
quic_rcidm.c:rcidm_tick:
  541|  2.14M|{
  542|  2.14M|    if (rcidm_should_roll(rcidm))
  ------------------
  |  Branch (542:9): [True: 891k, False: 1.25M]
  ------------------
  543|   891k|        rcidm_roll(rcidm);
  544|       |
  545|  2.14M|    rcidm_update(rcidm);
  546|  2.14M|}
quic_rcidm.c:rcidm_should_roll:
  528|  2.14M|{
  529|       |    /*
  530|       |     * Always switch as soon as possible if handshake completes;
  531|       |     * and every n packets after handshake completes or the last roll; and
  532|       |     * whenever manually requested.
  533|       |     */
  534|  2.14M|    return rcidm->handshake_complete
  ------------------
  |  Branch (534:12): [True: 1.27M, False: 875k]
  ------------------
  535|  2.14M|        && (rcidm->num_changes == 0
  ------------------
  |  Branch (535:13): [True: 161k, False: 1.11M]
  ------------------
  536|  1.27M|            || rcidm->packets_sent >= PACKETS_PER_RCID
  ------------------
  |  |   40|  2.38M|#define PACKETS_PER_RCID        10000
  ------------------
  |  Branch (536:16): [True: 253k, False: 857k]
  ------------------
  537|  1.27M|            || rcidm->roll_requested);
  ------------------
  |  Branch (537:16): [True: 476k, False: 380k]
  ------------------
  538|  2.14M|}
quic_rcidm.c:rcidm_roll:
  472|   891k|{
  473|   891k|    RCID *rcid;
  474|       |
  475|   891k|    if ((rcid = ossl_pqueue_RCID_peek(rcidm->rcids)) == NULL)
  ------------------
  |  Branch (475:9): [True: 620k, False: 270k]
  ------------------
  476|   620k|        return;
  477|       |
  478|   270k|    rcidm_transition_rcid(rcidm, rcid, RCID_STATE_CUR);
  479|       |
  480|   270k|    ++rcidm->num_changes;
  481|   270k|    rcidm->roll_requested = 0;
  482|       |
  483|   270k|    if (rcidm->packets_sent >= PACKETS_PER_RCID)
  ------------------
  |  |   40|   270k|#define PACKETS_PER_RCID        10000
  ------------------
  |  Branch (483:9): [True: 1.82k, False: 269k]
  ------------------
  484|  1.82k|        rcidm->packets_sent %= PACKETS_PER_RCID;
  ------------------
  |  |   40|  1.82k|#define PACKETS_PER_RCID        10000
  ------------------
  485|   269k|    else
  486|   269k|        rcidm->packets_sent = 0;
  487|   270k|}
quic_rcidm.c:rcidm_create_rcid:
  344|  1.44M|{
  345|  1.44M|    RCID *rcid;
  346|       |
  347|  1.44M|    if (cid->id_len < 1 || cid->id_len > QUIC_MAX_CONN_ID_LEN
  ------------------
  |  |   75|  2.87M|#  define QUIC_MAX_CONN_ID_LEN   20
  ------------------
  |  Branch (347:9): [True: 7.53k, False: 1.43M]
  |  Branch (347:28): [True: 0, False: 1.43M]
  ------------------
  348|  1.44M|        || seq_num > OSSL_QUIC_VLINT_MAX
  ------------------
  |  |   31|  1.43M|#define OSSL_QUIC_VLINT_MAX    OSSL_QUIC_VLINT_8B_MAX
  |  |  ------------------
  |  |  |  |   28|  2.87M|#define OSSL_QUIC_VLINT_8B_MAX (((uint64_t)1 << 62) - 1)
  |  |  ------------------
  ------------------
  |  Branch (348:12): [True: 721, False: 1.43M]
  ------------------
  349|  1.44M|        || ossl_pqueue_RCID_num(rcidm->rcids) + rcidm->num_retiring
  ------------------
  |  Branch (349:12): [True: 0, False: 1.43M]
  ------------------
  350|  1.43M|            > MAX_NUMBERED_RCIDS)
  ------------------
  |  |  243|  1.43M|#define MAX_NUMBERED_RCIDS      (SIZE_MAX / 2)
  ------------------
  351|  8.26k|        return NULL;
  352|       |
  353|  1.43M|    if ((rcid = OPENSSL_zalloc(sizeof(*rcid))) == NULL)
  ------------------
  |  |  104|  1.43M|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|  1.43M|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|  1.43M|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (353:9): [True: 0, False: 1.43M]
  ------------------
  354|      0|        return NULL;
  355|       |
  356|  1.43M|    rcid->seq_num           = seq_num;
  357|  1.43M|    rcid->cid               = *cid;
  358|  1.43M|    rcid->type              = type;
  359|       |
  360|  1.43M|    if (rcid->seq_num >= rcidm->retire_prior_to) {
  ------------------
  |  Branch (360:9): [True: 1.14M, False: 288k]
  ------------------
  361|  1.14M|        rcid->state = RCID_STATE_PENDING;
  362|       |
  363|  1.14M|        if (!ossl_pqueue_RCID_push(rcidm->rcids, rcid, &rcid->pq_idx)) {
  ------------------
  |  Branch (363:13): [True: 0, False: 1.14M]
  ------------------
  364|      0|            OPENSSL_free(rcid);
  ------------------
  |  |  115|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  365|      0|            return NULL;
  366|      0|        }
  367|  1.14M|    } else {
  368|       |        /* RCID is immediately retired upon creation. */
  369|   288k|        rcid->state     = RCID_STATE_RETIRING;
  370|   288k|        rcid->pq_idx    = SIZE_MAX;
  371|   288k|        ossl_list_retiring_insert_tail(&rcidm->retiring_list, rcid);
  372|   288k|        ++rcidm->num_retiring;
  373|   288k|    }
  374|       |
  375|  1.43M|    rcidm_check_rcid(rcidm, rcid);
  376|  1.43M|    return rcid;
  377|  1.43M|}
quic_rcidm.c:rcidm_handle_retire_prior_to:
  442|  1.42M|{
  443|  1.42M|    RCID *rcid;
  444|       |
  445|  1.42M|    if (retire_prior_to <= rcidm->retire_prior_to)
  ------------------
  |  Branch (445:9): [True: 1.41M, False: 12.1k]
  ------------------
  446|  1.41M|        return;
  447|       |
  448|       |    /*
  449|       |     * Retire the current RCID (if any) if it is affected.
  450|       |     */
  451|  12.1k|    if (rcidm->cur_rcid != NULL && rcidm->cur_rcid->seq_num < retire_prior_to)
  ------------------
  |  Branch (451:9): [True: 6.20k, False: 5.93k]
  |  Branch (451:36): [True: 2.33k, False: 3.86k]
  ------------------
  452|  2.33k|        rcidm_transition_rcid(rcidm, rcidm->cur_rcid, RCID_STATE_RETIRING);
  453|       |
  454|       |    /*
  455|       |     * Any other RCIDs needing retirement will be at the start of the priority
  456|       |     * queue, so just stop once we see a higher sequence number exceeding the
  457|       |     * threshold.
  458|       |     */
  459|   308k|    while ((rcid = ossl_pqueue_RCID_peek(rcidm->rcids)) != NULL
  ------------------
  |  Branch (459:12): [True: 305k, False: 3.42k]
  ------------------
  460|   308k|           && rcid->seq_num < retire_prior_to)
  ------------------
  |  Branch (460:15): [True: 296k, False: 8.71k]
  ------------------
  461|   296k|        rcidm_transition_rcid(rcidm, rcid, RCID_STATE_RETIRING);
  462|       |
  463|  12.1k|    rcidm->retire_prior_to = retire_prior_to;
  464|  12.1k|}
quic_rcidm.c:rcidm_get_retire:
  630|  9.26k|{
  631|  9.26k|    RCID *rcid = ossl_list_retiring_head(&rcidm->retiring_list);
  632|       |
  633|  9.26k|    if (rcid == NULL)
  ------------------
  |  Branch (633:9): [True: 6.52k, False: 2.74k]
  ------------------
  634|  6.52k|        return 0;
  635|       |
  636|  2.74k|    if (seq_num != NULL)
  ------------------
  |  Branch (636:9): [True: 2.74k, False: 0]
  ------------------
  637|  2.74k|        *seq_num = rcid->seq_num;
  638|       |
  639|  2.74k|    if (!peek)
  ------------------
  |  Branch (639:9): [True: 1.71k, False: 1.03k]
  ------------------
  640|  1.71k|        rcidm_free_rcid(rcidm, rcid);
  641|       |
  642|  2.74k|    return 1;
  643|  9.26k|}
quic_rcidm.c:rcidm_free_rcid:
  415|  1.71k|{
  416|  1.71k|    if (rcid == NULL)
  ------------------
  |  Branch (416:9): [True: 0, False: 1.71k]
  ------------------
  417|      0|        return;
  418|       |
  419|  1.71k|    rcidm_check_rcid(rcidm, rcid);
  420|       |
  421|  1.71k|    switch (rcid->state) {
  422|      0|    case RCID_STATE_PENDING:
  ------------------
  |  Branch (422:5): [True: 0, False: 1.71k]
  ------------------
  423|      0|        ossl_pqueue_RCID_remove(rcidm->rcids, rcid->pq_idx);
  424|      0|        break;
  425|      0|    case RCID_STATE_CUR:
  ------------------
  |  Branch (425:5): [True: 0, False: 1.71k]
  ------------------
  426|      0|        rcidm->cur_rcid = NULL;
  427|      0|        break;
  428|  1.71k|    case RCID_STATE_RETIRING:
  ------------------
  |  Branch (428:5): [True: 1.71k, False: 0]
  ------------------
  429|  1.71k|        ossl_list_retiring_remove(&rcidm->retiring_list, rcid);
  430|  1.71k|        --rcidm->num_retiring;
  431|  1.71k|        break;
  432|      0|    default:
  ------------------
  |  Branch (432:5): [True: 0, False: 1.71k]
  ------------------
  433|      0|        assert(0);
  434|      0|        break;
  435|  1.71k|    }
  436|       |
  437|  1.71k|    OPENSSL_free(rcid);
  ------------------
  |  |  115|  1.71k|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  291|  1.71k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  292|  1.71k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  438|  1.71k|}

ssl_sort_cipher_list:
 3306|      2|{
 3307|      2|    qsort(tls13_ciphers, TLS13_NUM_CIPHERS, sizeof(tls13_ciphers[0]),
  ------------------
  |  |   24|      2|#define TLS13_NUM_CIPHERS       OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|      2|# define OSSL_NELEM(x)    (sizeof(x)/sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3308|      2|          cipher_compare);
 3309|      2|    qsort(ssl3_ciphers, SSL3_NUM_CIPHERS, sizeof(ssl3_ciphers[0]),
  ------------------
  |  |   25|      2|#define SSL3_NUM_CIPHERS        OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|      2|# define OSSL_NELEM(x)    (sizeof(x)/sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3310|      2|          cipher_compare);
 3311|      2|    qsort(ssl3_scsvs, SSL3_NUM_SCSVS, sizeof(ssl3_scsvs[0]), cipher_compare);
  ------------------
  |  |   26|      2|#define SSL3_NUM_SCSVS          OSSL_NELEM(ssl3_scsvs)
  |  |  ------------------
  |  |  |  |   14|      2|# define OSSL_NELEM(x)    (sizeof(x)/sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3312|      2|}
s3_lib.c:cipher_compare:
 3296|  1.94k|{
 3297|  1.94k|    const SSL_CIPHER *ap = (const SSL_CIPHER *)a;
 3298|  1.94k|    const SSL_CIPHER *bp = (const SSL_CIPHER *)b;
 3299|       |
 3300|  1.94k|    if (ap->id == bp->id)
  ------------------
  |  Branch (3300:9): [True: 0, False: 1.94k]
  ------------------
 3301|      0|        return 0;
 3302|  1.94k|    return ap->id < bp->id ? -1 : 1;
  ------------------
  |  Branch (3302:12): [True: 1.25k, False: 694]
  ------------------
 3303|  1.94k|}

SSL_COMP_get_compression_methods:
 1978|      2|{
 1979|      2|    STACK_OF(SSL_COMP) **rv;
  ------------------
  |  |   31|      2|# define STACK_OF(type) struct stack_st_##type
  ------------------
 1980|       |
 1981|      2|    rv = (STACK_OF(SSL_COMP) **)OSSL_LIB_CTX_get_data(NULL,
 1982|      2|                                     OSSL_LIB_CTX_COMP_METHODS);
  ------------------
  |  |  119|      2|# define OSSL_LIB_CTX_COMP_METHODS                  21
  ------------------
 1983|      2|    if (rv != NULL)
  ------------------
  |  Branch (1983:9): [True: 2, False: 0]
  ------------------
 1984|      2|        return *rv;
 1985|      0|    else
 1986|      0|        return NULL;
 1987|      2|}

ossl_err_load_SSL_strings:
  623|      2|{
  624|      2|#ifndef OPENSSL_NO_ERR
  625|      2|    if (ERR_reason_error_string(SSL_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (625:9): [True: 2, False: 0]
  ------------------
  626|      2|        ERR_load_strings_const(SSL_str_reasons);
  627|      2|#endif
  628|      2|    return 1;
  629|      2|}

OPENSSL_init_ssl:
   69|      2|{
   70|      2|    static int stoperrset = 0;
   71|       |
   72|      2|    if (stopped) {
  ------------------
  |  Branch (72:9): [True: 0, False: 2]
  ------------------
   73|      0|        if (!stoperrset) {
  ------------------
  |  Branch (73:13): [True: 0, False: 0]
  ------------------
   74|       |            /*
   75|       |             * We only ever set this once to avoid getting into an infinite
   76|       |             * loop where the error system keeps trying to init and fails so
   77|       |             * sets an error etc
   78|       |             */
   79|      0|            stoperrset = 1;
   80|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_INIT_FAIL);
  ------------------
  |  |  401|      0|# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
  |  |  ------------------
  |  |  |  |  403|      0|    (ERR_new(),                                                 \
  |  |  |  |  404|      0|     ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  291|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  292|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
   81|      0|        }
   82|      0|        return 0;
   83|      0|    }
   84|       |
   85|      2|    opts |= OPENSSL_INIT_ADD_ALL_CIPHERS
  ------------------
  |  |  464|      2|# define OPENSSL_INIT_ADD_ALL_CIPHERS        0x00000004L
  ------------------
   86|      2|         |  OPENSSL_INIT_ADD_ALL_DIGESTS;
  ------------------
  |  |  465|      2|# define OPENSSL_INIT_ADD_ALL_DIGESTS        0x00000008L
  ------------------
   87|      2|#ifndef OPENSSL_NO_AUTOLOAD_CONFIG
   88|      2|    if ((opts & OPENSSL_INIT_NO_LOAD_CONFIG) == 0)
  ------------------
  |  |  469|      2|# define OPENSSL_INIT_NO_LOAD_CONFIG         0x00000080L
  ------------------
  |  Branch (88:9): [True: 2, False: 0]
  ------------------
   89|      2|        opts |= OPENSSL_INIT_LOAD_CONFIG;
  ------------------
  |  |  468|      2|# define OPENSSL_INIT_LOAD_CONFIG            0x00000040L
  ------------------
   90|      2|#endif
   91|       |
   92|      2|    if (!OPENSSL_init_crypto(opts, settings))
  ------------------
  |  Branch (92:9): [True: 0, False: 2]
  ------------------
   93|      0|        return 0;
   94|       |
   95|      2|    if (!RUN_ONCE(&ssl_base, ossl_init_ssl_base))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (95:9): [True: 0, False: 2]
  ------------------
   96|      0|        return 0;
   97|       |
   98|      2|    if ((opts & OPENSSL_INIT_NO_LOAD_SSL_STRINGS)
  ------------------
  |  | 2766|      2|# define OPENSSL_INIT_NO_LOAD_SSL_STRINGS    0x00100000L
  ------------------
  |  Branch (98:9): [True: 0, False: 2]
  ------------------
   99|      2|        && !RUN_ONCE_ALT(&ssl_strings, ossl_init_no_load_ssl_strings,
  ------------------
  |  |  148|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (148:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (99:12): [True: 0, False: 0]
  ------------------
  100|      2|                         ossl_init_load_ssl_strings))
  101|      0|        return 0;
  102|       |
  103|      2|    if ((opts & OPENSSL_INIT_LOAD_SSL_STRINGS)
  ------------------
  |  | 2767|      2|# define OPENSSL_INIT_LOAD_SSL_STRINGS       0x00200000L
  ------------------
  |  Branch (103:9): [True: 2, False: 0]
  ------------------
  104|      2|        && !RUN_ONCE(&ssl_strings, ossl_init_load_ssl_strings))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (104:12): [True: 0, False: 2]
  ------------------
  105|      0|        return 0;
  106|       |
  107|      2|    return 1;
  108|      2|}
ssl_init.c:ossl_init_ssl_base:
   25|      2|{
   26|      2|#ifndef OPENSSL_NO_COMP
   27|      2|    OSSL_TRACE(INIT, "ossl_init_ssl_base: "
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   28|      2|               "SSL_COMP_get_compression_methods()\n");
   29|       |    /*
   30|       |     * This will initialise the built-in compression algorithms. The value
   31|       |     * returned is a STACK_OF(SSL_COMP), but that can be discarded safely
   32|       |     */
   33|      2|    SSL_COMP_get_compression_methods();
   34|      2|#endif
   35|      2|    ssl_sort_cipher_list();
   36|      2|    OSSL_TRACE(INIT, "ossl_init_ssl_base: SSL_add_ssl_module()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   37|      2|    ssl_base_inited = 1;
   38|      2|    return 1;
   39|      2|}
ssl_init.c:ossl_init_load_ssl_strings:
   44|      2|{
   45|       |    /*
   46|       |     * OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time
   47|       |     * pulling in all the error strings during static linking
   48|       |     */
   49|      2|#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
   50|      2|    OSSL_TRACE(INIT, "ossl_init_load_ssl_strings: ossl_err_load_SSL_strings()\n");
  ------------------
  |  |  287|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      2|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   51|      2|    ossl_err_load_SSL_strings();
   52|      2|#endif
   53|      2|    return 1;
   54|      2|}

