ossl_err_load_ASN1_strings:
  206|      2|{
  207|      2|#ifndef OPENSSL_NO_ERR
  208|      2|    if (ERR_reason_error_string(ASN1_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (208:9): [True: 2, False: 0]
  ------------------
  209|      2|        ERR_load_strings_const(ASN1_str_reasons);
  210|      2|#endif
  211|      2|    return 1;
  212|      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_sock_cleanup_int:
  204|      2|{
  205|       |# ifdef OPENSSL_SYS_WINDOWS
  206|       |    if (wsa_init_done) {
  207|       |        wsa_init_done = 0;
  208|       |        WSACleanup();
  209|       |    }
  210|       |# endif
  211|      2|}

bn_mul_add_words:
  112|   100k|{
  113|   100k|    BN_ULONG c1 = 0;
  ------------------
  |  |   37|   100k|#  define BN_ULONG        unsigned long
  ------------------
  114|       |
  115|   100k|    if (num <= 0)
  ------------------
  |  Branch (115:9): [True: 0, False: 100k]
  ------------------
  116|      0|        return c1;
  117|       |
  118|   211M|    while (num & ~3) {
  ------------------
  |  Branch (118:12): [True: 210M, False: 100k]
  ------------------
  119|   210M|        mul_add(rp[0], ap[0], w, c1);
  ------------------
  |  |   74|   210M|# define mul_add(r,a,word,carry) do {   \
  |  |   75|   210M|        register BN_ULONG high,low;     \
  |  |   76|   210M|        asm ("mulq %3"                  \
  |  |   77|   210M|                : "=a"(low),"=d"(high)  \
  |  |   78|   210M|                : "a"(word),"m"(a)      \
  |  |   79|   210M|                : "cc");                \
  |  |   80|   210M|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   81|   210M|                : "+r"(carry),"+d"(high)\
  |  |   82|   210M|                : "a"(low),"g"(0)       \
  |  |   83|   210M|                : "cc");                \
  |  |   84|   210M|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   85|   210M|                : "+m"(r),"+d"(high)    \
  |  |   86|   210M|                : "r"(carry),"g"(0)     \
  |  |   87|   210M|                : "cc");                \
  |  |   88|   210M|        carry=high;                     \
  |  |   89|   210M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (89:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  120|   210M|        mul_add(rp[1], ap[1], w, c1);
  ------------------
  |  |   74|   210M|# define mul_add(r,a,word,carry) do {   \
  |  |   75|   210M|        register BN_ULONG high,low;     \
  |  |   76|   210M|        asm ("mulq %3"                  \
  |  |   77|   210M|                : "=a"(low),"=d"(high)  \
  |  |   78|   210M|                : "a"(word),"m"(a)      \
  |  |   79|   210M|                : "cc");                \
  |  |   80|   210M|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   81|   210M|                : "+r"(carry),"+d"(high)\
  |  |   82|   210M|                : "a"(low),"g"(0)       \
  |  |   83|   210M|                : "cc");                \
  |  |   84|   210M|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   85|   210M|                : "+m"(r),"+d"(high)    \
  |  |   86|   210M|                : "r"(carry),"g"(0)     \
  |  |   87|   210M|                : "cc");                \
  |  |   88|   210M|        carry=high;                     \
  |  |   89|   210M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (89:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  121|   210M|        mul_add(rp[2], ap[2], w, c1);
  ------------------
  |  |   74|   210M|# define mul_add(r,a,word,carry) do {   \
  |  |   75|   210M|        register BN_ULONG high,low;     \
  |  |   76|   210M|        asm ("mulq %3"                  \
  |  |   77|   210M|                : "=a"(low),"=d"(high)  \
  |  |   78|   210M|                : "a"(word),"m"(a)      \
  |  |   79|   210M|                : "cc");                \
  |  |   80|   210M|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   81|   210M|                : "+r"(carry),"+d"(high)\
  |  |   82|   210M|                : "a"(low),"g"(0)       \
  |  |   83|   210M|                : "cc");                \
  |  |   84|   210M|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   85|   210M|                : "+m"(r),"+d"(high)    \
  |  |   86|   210M|                : "r"(carry),"g"(0)     \
  |  |   87|   210M|                : "cc");                \
  |  |   88|   210M|        carry=high;                     \
  |  |   89|   210M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (89:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  122|   210M|        mul_add(rp[3], ap[3], w, c1);
  ------------------
  |  |   74|   210M|# define mul_add(r,a,word,carry) do {   \
  |  |   75|   210M|        register BN_ULONG high,low;     \
  |  |   76|   210M|        asm ("mulq %3"                  \
  |  |   77|   210M|                : "=a"(low),"=d"(high)  \
  |  |   78|   210M|                : "a"(word),"m"(a)      \
  |  |   79|   210M|                : "cc");                \
  |  |   80|   210M|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   81|   210M|                : "+r"(carry),"+d"(high)\
  |  |   82|   210M|                : "a"(low),"g"(0)       \
  |  |   83|   210M|                : "cc");                \
  |  |   84|   210M|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   85|   210M|                : "+m"(r),"+d"(high)    \
  |  |   86|   210M|                : "r"(carry),"g"(0)     \
  |  |   87|   210M|                : "cc");                \
  |  |   88|   210M|        carry=high;                     \
  |  |   89|   210M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (89:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  123|   210M|        ap += 4;
  124|   210M|        rp += 4;
  125|   210M|        num -= 4;
  126|   210M|    }
  127|   100k|    if (num) {
  ------------------
  |  Branch (127:9): [True: 86.9k, False: 13.9k]
  ------------------
  128|  86.9k|        mul_add(rp[0], ap[0], w, c1);
  ------------------
  |  |   74|  86.9k|# define mul_add(r,a,word,carry) do {   \
  |  |   75|  86.9k|        register BN_ULONG high,low;     \
  |  |   76|  86.9k|        asm ("mulq %3"                  \
  |  |   77|  86.9k|                : "=a"(low),"=d"(high)  \
  |  |   78|  86.9k|                : "a"(word),"m"(a)      \
  |  |   79|  86.9k|                : "cc");                \
  |  |   80|  86.9k|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   81|  86.9k|                : "+r"(carry),"+d"(high)\
  |  |   82|  86.9k|                : "a"(low),"g"(0)       \
  |  |   83|  86.9k|                : "cc");                \
  |  |   84|  86.9k|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   85|  86.9k|                : "+m"(r),"+d"(high)    \
  |  |   86|  86.9k|                : "r"(carry),"g"(0)     \
  |  |   87|  86.9k|                : "cc");                \
  |  |   88|  86.9k|        carry=high;                     \
  |  |   89|  86.9k|        } while (0)
  |  |  ------------------
  |  |  |  Branch (89:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  129|  86.9k|        if (--num == 0)
  ------------------
  |  Branch (129:13): [True: 49.5k, False: 37.3k]
  ------------------
  130|  49.5k|            return c1;
  131|  37.3k|        mul_add(rp[1], ap[1], w, c1);
  ------------------
  |  |   74|  37.3k|# define mul_add(r,a,word,carry) do {   \
  |  |   75|  37.3k|        register BN_ULONG high,low;     \
  |  |   76|  37.3k|        asm ("mulq %3"                  \
  |  |   77|  37.3k|                : "=a"(low),"=d"(high)  \
  |  |   78|  37.3k|                : "a"(word),"m"(a)      \
  |  |   79|  37.3k|                : "cc");                \
  |  |   80|  37.3k|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   81|  37.3k|                : "+r"(carry),"+d"(high)\
  |  |   82|  37.3k|                : "a"(low),"g"(0)       \
  |  |   83|  37.3k|                : "cc");                \
  |  |   84|  37.3k|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   85|  37.3k|                : "+m"(r),"+d"(high)    \
  |  |   86|  37.3k|                : "r"(carry),"g"(0)     \
  |  |   87|  37.3k|                : "cc");                \
  |  |   88|  37.3k|        carry=high;                     \
  |  |   89|  37.3k|        } while (0)
  |  |  ------------------
  |  |  |  Branch (89:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  132|  37.3k|        if (--num == 0)
  ------------------
  |  Branch (132:13): [True: 9.29k, False: 28.0k]
  ------------------
  133|  9.29k|            return c1;
  134|  28.0k|        mul_add(rp[2], ap[2], w, c1);
  ------------------
  |  |   74|  28.0k|# define mul_add(r,a,word,carry) do {   \
  |  |   75|  28.0k|        register BN_ULONG high,low;     \
  |  |   76|  28.0k|        asm ("mulq %3"                  \
  |  |   77|  28.0k|                : "=a"(low),"=d"(high)  \
  |  |   78|  28.0k|                : "a"(word),"m"(a)      \
  |  |   79|  28.0k|                : "cc");                \
  |  |   80|  28.0k|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   81|  28.0k|                : "+r"(carry),"+d"(high)\
  |  |   82|  28.0k|                : "a"(low),"g"(0)       \
  |  |   83|  28.0k|                : "cc");                \
  |  |   84|  28.0k|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   85|  28.0k|                : "+m"(r),"+d"(high)    \
  |  |   86|  28.0k|                : "r"(carry),"g"(0)     \
  |  |   87|  28.0k|                : "cc");                \
  |  |   88|  28.0k|        carry=high;                     \
  |  |   89|  28.0k|        } while (0)
  |  |  ------------------
  |  |  |  Branch (89:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  135|  28.0k|        return c1;
  136|  37.3k|    }
  137|       |
  138|  13.9k|    return c1;
  139|   100k|}
bn_mul_words:
  142|   938k|{
  143|   938k|    BN_ULONG c1 = 0;
  ------------------
  |  |   37|   938k|#  define BN_ULONG        unsigned long
  ------------------
  144|       |
  145|   938k|    if (num <= 0)
  ------------------
  |  Branch (145:9): [True: 0, False: 938k]
  ------------------
  146|      0|        return c1;
  147|       |
  148|   785M|    while (num & ~3) {
  ------------------
  |  Branch (148:12): [True: 784M, False: 938k]
  ------------------
  149|   784M|        mul(rp[0], ap[0], w, c1);
  ------------------
  |  |   91|   784M|# define mul(r,a,word,carry) do {       \
  |  |   92|   784M|        register BN_ULONG high,low;     \
  |  |   93|   784M|        asm ("mulq %3"                  \
  |  |   94|   784M|                : "=a"(low),"=d"(high)  \
  |  |   95|   784M|                : "a"(word),"g"(a)      \
  |  |   96|   784M|                : "cc");                \
  |  |   97|   784M|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   98|   784M|                : "+r"(carry),"+d"(high)\
  |  |   99|   784M|                : "a"(low),"g"(0)       \
  |  |  100|   784M|                : "cc");                \
  |  |  101|   784M|        (r)=carry, carry=high;          \
  |  |  102|   784M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (102:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  150|   784M|        mul(rp[1], ap[1], w, c1);
  ------------------
  |  |   91|   784M|# define mul(r,a,word,carry) do {       \
  |  |   92|   784M|        register BN_ULONG high,low;     \
  |  |   93|   784M|        asm ("mulq %3"                  \
  |  |   94|   784M|                : "=a"(low),"=d"(high)  \
  |  |   95|   784M|                : "a"(word),"g"(a)      \
  |  |   96|   784M|                : "cc");                \
  |  |   97|   784M|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   98|   784M|                : "+r"(carry),"+d"(high)\
  |  |   99|   784M|                : "a"(low),"g"(0)       \
  |  |  100|   784M|                : "cc");                \
  |  |  101|   784M|        (r)=carry, carry=high;          \
  |  |  102|   784M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (102:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  151|   784M|        mul(rp[2], ap[2], w, c1);
  ------------------
  |  |   91|   784M|# define mul(r,a,word,carry) do {       \
  |  |   92|   784M|        register BN_ULONG high,low;     \
  |  |   93|   784M|        asm ("mulq %3"                  \
  |  |   94|   784M|                : "=a"(low),"=d"(high)  \
  |  |   95|   784M|                : "a"(word),"g"(a)      \
  |  |   96|   784M|                : "cc");                \
  |  |   97|   784M|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   98|   784M|                : "+r"(carry),"+d"(high)\
  |  |   99|   784M|                : "a"(low),"g"(0)       \
  |  |  100|   784M|                : "cc");                \
  |  |  101|   784M|        (r)=carry, carry=high;          \
  |  |  102|   784M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (102:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  152|   784M|        mul(rp[3], ap[3], w, c1);
  ------------------
  |  |   91|   784M|# define mul(r,a,word,carry) do {       \
  |  |   92|   784M|        register BN_ULONG high,low;     \
  |  |   93|   784M|        asm ("mulq %3"                  \
  |  |   94|   784M|                : "=a"(low),"=d"(high)  \
  |  |   95|   784M|                : "a"(word),"g"(a)      \
  |  |   96|   784M|                : "cc");                \
  |  |   97|   784M|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   98|   784M|                : "+r"(carry),"+d"(high)\
  |  |   99|   784M|                : "a"(low),"g"(0)       \
  |  |  100|   784M|                : "cc");                \
  |  |  101|   784M|        (r)=carry, carry=high;          \
  |  |  102|   784M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (102:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  153|   784M|        ap += 4;
  154|   784M|        rp += 4;
  155|   784M|        num -= 4;
  156|   784M|    }
  157|   938k|    if (num) {
  ------------------
  |  Branch (157:9): [True: 756k, False: 181k]
  ------------------
  158|   756k|        mul(rp[0], ap[0], w, c1);
  ------------------
  |  |   91|   756k|# define mul(r,a,word,carry) do {       \
  |  |   92|   756k|        register BN_ULONG high,low;     \
  |  |   93|   756k|        asm ("mulq %3"                  \
  |  |   94|   756k|                : "=a"(low),"=d"(high)  \
  |  |   95|   756k|                : "a"(word),"g"(a)      \
  |  |   96|   756k|                : "cc");                \
  |  |   97|   756k|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   98|   756k|                : "+r"(carry),"+d"(high)\
  |  |   99|   756k|                : "a"(low),"g"(0)       \
  |  |  100|   756k|                : "cc");                \
  |  |  101|   756k|        (r)=carry, carry=high;          \
  |  |  102|   756k|        } while (0)
  |  |  ------------------
  |  |  |  Branch (102:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  159|   756k|        if (--num == 0)
  ------------------
  |  Branch (159:13): [True: 306k, False: 449k]
  ------------------
  160|   306k|            return c1;
  161|   449k|        mul(rp[1], ap[1], w, c1);
  ------------------
  |  |   91|   449k|# define mul(r,a,word,carry) do {       \
  |  |   92|   449k|        register BN_ULONG high,low;     \
  |  |   93|   449k|        asm ("mulq %3"                  \
  |  |   94|   449k|                : "=a"(low),"=d"(high)  \
  |  |   95|   449k|                : "a"(word),"g"(a)      \
  |  |   96|   449k|                : "cc");                \
  |  |   97|   449k|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   98|   449k|                : "+r"(carry),"+d"(high)\
  |  |   99|   449k|                : "a"(low),"g"(0)       \
  |  |  100|   449k|                : "cc");                \
  |  |  101|   449k|        (r)=carry, carry=high;          \
  |  |  102|   449k|        } while (0)
  |  |  ------------------
  |  |  |  Branch (102:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  162|   449k|        if (--num == 0)
  ------------------
  |  Branch (162:13): [True: 273k, False: 176k]
  ------------------
  163|   273k|            return c1;
  164|   176k|        mul(rp[2], ap[2], w, c1);
  ------------------
  |  |   91|   176k|# define mul(r,a,word,carry) do {       \
  |  |   92|   176k|        register BN_ULONG high,low;     \
  |  |   93|   176k|        asm ("mulq %3"                  \
  |  |   94|   176k|                : "=a"(low),"=d"(high)  \
  |  |   95|   176k|                : "a"(word),"g"(a)      \
  |  |   96|   176k|                : "cc");                \
  |  |   97|   176k|        asm ("addq %2,%0; adcq %3,%1"   \
  |  |   98|   176k|                : "+r"(carry),"+d"(high)\
  |  |   99|   176k|                : "a"(low),"g"(0)       \
  |  |  100|   176k|                : "cc");                \
  |  |  101|   176k|        (r)=carry, carry=high;          \
  |  |  102|   176k|        } while (0)
  |  |  ------------------
  |  |  |  Branch (102:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  165|   176k|    }
  166|   358k|    return c1;
  167|   938k|}
bn_div_words:
  195|   928k|{
  196|   928k|    BN_ULONG ret, waste;
  ------------------
  |  |   37|   928k|#  define BN_ULONG        unsigned long
  ------------------
  197|       |
  198|   928k| asm("divq      %4":"=a"(ret), "=d"(waste)
  199|   928k| :     "a"(l), "d"(h), "r"(d)
  200|   928k| :     "cc");
  201|       |
  202|   928k|    return ret;
  203|   928k|}
bn_add_words:
  207|  4.55M|{
  208|  4.55M|    BN_ULONG ret;
  ------------------
  |  |   37|  4.55M|#  define BN_ULONG        unsigned long
  ------------------
  209|  4.55M|    size_t i = 0;
  210|       |
  211|  4.55M|    if (n <= 0)
  ------------------
  |  Branch (211:9): [True: 522, False: 4.55M]
  ------------------
  212|    522|        return 0;
  213|       |
  214|  4.55M|    asm volatile ("       subq    %0,%0           \n" /* clear carry */
  215|  4.55M|                  "       jmp     1f              \n"
  216|  4.55M|                  ".p2align 4                     \n"
  217|  4.55M|                  "1:     movq    (%4,%2,8),%0    \n"
  218|  4.55M|                  "       adcq    (%5,%2,8),%0    \n"
  219|  4.55M|                  "       movq    %0,(%3,%2,8)    \n"
  220|  4.55M|                  "       lea     1(%2),%2        \n"
  221|  4.55M|                  "       dec     %1              \n"
  222|  4.55M|                  "       jnz     1b              \n"
  223|  4.55M|                  "       sbbq    %0,%0           \n"
  224|  4.55M|                  :"=&r" (ret), "+c"(n), "+r"(i)
  225|  4.55M|                  :"r"(rp), "r"(ap), "r"(bp)
  226|  4.55M|                  :"cc", "memory");
  227|       |
  228|  4.55M|    return ret & 1;
  229|  4.55M|}
bn_sub_words:
  234|  4.09M|{
  235|  4.09M|    BN_ULONG ret;
  ------------------
  |  |   37|  4.09M|#  define BN_ULONG        unsigned long
  ------------------
  236|  4.09M|    size_t i = 0;
  237|       |
  238|  4.09M|    if (n <= 0)
  ------------------
  |  Branch (238:9): [True: 779, False: 4.09M]
  ------------------
  239|    779|        return 0;
  240|       |
  241|  4.09M|    asm volatile ("       subq    %0,%0           \n" /* clear borrow */
  242|  4.09M|                  "       jmp     1f              \n"
  243|  4.09M|                  ".p2align 4                     \n"
  244|  4.09M|                  "1:     movq    (%4,%2,8),%0    \n"
  245|  4.09M|                  "       sbbq    (%5,%2,8),%0    \n"
  246|  4.09M|                  "       movq    %0,(%3,%2,8)    \n"
  247|  4.09M|                  "       lea     1(%2),%2        \n"
  248|  4.09M|                  "       dec     %1              \n"
  249|  4.09M|                  "       jnz     1b              \n"
  250|  4.09M|                  "       sbbq    %0,%0           \n"
  251|  4.09M|                  :"=&r" (ret), "+c"(n), "+r"(i)
  252|  4.09M|                  :"r"(rp), "r"(ap), "r"(bp)
  253|  4.09M|                  :"cc", "memory");
  254|       |
  255|  4.09M|    return ret & 1;
  256|  4.09M|}
bn_mul_comba8:
  394|  2.67M|{
  395|  2.67M|    BN_ULONG c1, c2, c3;
  ------------------
  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  ------------------
  396|       |
  397|  2.67M|    c1 = 0;
  398|  2.67M|    c2 = 0;
  399|  2.67M|    c3 = 0;
  400|  2.67M|    mul_add_c(a[0], b[0], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  401|  2.67M|    r[0] = c1;
  402|  2.67M|    c1 = 0;
  403|  2.67M|    mul_add_c(a[0], b[1], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  404|  2.67M|    mul_add_c(a[1], b[0], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  405|  2.67M|    r[1] = c2;
  406|  2.67M|    c2 = 0;
  407|  2.67M|    mul_add_c(a[2], b[0], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  408|  2.67M|    mul_add_c(a[1], b[1], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  409|  2.67M|    mul_add_c(a[0], b[2], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  410|  2.67M|    r[2] = c3;
  411|  2.67M|    c3 = 0;
  412|  2.67M|    mul_add_c(a[0], b[3], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  413|  2.67M|    mul_add_c(a[1], b[2], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  414|  2.67M|    mul_add_c(a[2], b[1], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  415|  2.67M|    mul_add_c(a[3], b[0], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  416|  2.67M|    r[3] = c1;
  417|  2.67M|    c1 = 0;
  418|  2.67M|    mul_add_c(a[4], b[0], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  419|  2.67M|    mul_add_c(a[3], b[1], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  420|  2.67M|    mul_add_c(a[2], b[2], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  421|  2.67M|    mul_add_c(a[1], b[3], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  422|  2.67M|    mul_add_c(a[0], b[4], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  423|  2.67M|    r[4] = c2;
  424|  2.67M|    c2 = 0;
  425|  2.67M|    mul_add_c(a[0], b[5], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  426|  2.67M|    mul_add_c(a[1], b[4], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  427|  2.67M|    mul_add_c(a[2], b[3], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  428|  2.67M|    mul_add_c(a[3], b[2], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  429|  2.67M|    mul_add_c(a[4], b[1], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  430|  2.67M|    mul_add_c(a[5], b[0], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  431|  2.67M|    r[5] = c3;
  432|  2.67M|    c3 = 0;
  433|  2.67M|    mul_add_c(a[6], b[0], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  434|  2.67M|    mul_add_c(a[5], b[1], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  435|  2.67M|    mul_add_c(a[4], b[2], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  436|  2.67M|    mul_add_c(a[3], b[3], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  437|  2.67M|    mul_add_c(a[2], b[4], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  438|  2.67M|    mul_add_c(a[1], b[5], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  439|  2.67M|    mul_add_c(a[0], b[6], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  440|  2.67M|    r[6] = c1;
  441|  2.67M|    c1 = 0;
  442|  2.67M|    mul_add_c(a[0], b[7], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  443|  2.67M|    mul_add_c(a[1], b[6], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  444|  2.67M|    mul_add_c(a[2], b[5], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  445|  2.67M|    mul_add_c(a[3], b[4], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  446|  2.67M|    mul_add_c(a[4], b[3], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  447|  2.67M|    mul_add_c(a[5], b[2], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  448|  2.67M|    mul_add_c(a[6], b[1], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  449|  2.67M|    mul_add_c(a[7], b[0], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  450|  2.67M|    r[7] = c2;
  451|  2.67M|    c2 = 0;
  452|  2.67M|    mul_add_c(a[7], b[1], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  453|  2.67M|    mul_add_c(a[6], b[2], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  454|  2.67M|    mul_add_c(a[5], b[3], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  455|  2.67M|    mul_add_c(a[4], b[4], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  456|  2.67M|    mul_add_c(a[3], b[5], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  457|  2.67M|    mul_add_c(a[2], b[6], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  458|  2.67M|    mul_add_c(a[1], b[7], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  459|  2.67M|    r[8] = c3;
  460|  2.67M|    c3 = 0;
  461|  2.67M|    mul_add_c(a[2], b[7], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  462|  2.67M|    mul_add_c(a[3], b[6], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  463|  2.67M|    mul_add_c(a[4], b[5], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  464|  2.67M|    mul_add_c(a[5], b[4], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  465|  2.67M|    mul_add_c(a[6], b[3], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  466|  2.67M|    mul_add_c(a[7], b[2], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  467|  2.67M|    r[9] = c1;
  468|  2.67M|    c1 = 0;
  469|  2.67M|    mul_add_c(a[7], b[3], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  470|  2.67M|    mul_add_c(a[6], b[4], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  471|  2.67M|    mul_add_c(a[5], b[5], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  472|  2.67M|    mul_add_c(a[4], b[6], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  473|  2.67M|    mul_add_c(a[3], b[7], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  474|  2.67M|    r[10] = c2;
  475|  2.67M|    c2 = 0;
  476|  2.67M|    mul_add_c(a[4], b[7], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  477|  2.67M|    mul_add_c(a[5], b[6], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  478|  2.67M|    mul_add_c(a[6], b[5], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  479|  2.67M|    mul_add_c(a[7], b[4], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  480|  2.67M|    r[11] = c3;
  481|  2.67M|    c3 = 0;
  482|  2.67M|    mul_add_c(a[7], b[5], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  483|  2.67M|    mul_add_c(a[6], b[6], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  484|  2.67M|    mul_add_c(a[5], b[7], c1, c2, c3);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  485|  2.67M|    r[12] = c1;
  486|  2.67M|    c1 = 0;
  487|  2.67M|    mul_add_c(a[6], b[7], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  488|  2.67M|    mul_add_c(a[7], b[6], c2, c3, c1);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  489|  2.67M|    r[13] = c2;
  490|  2.67M|    c2 = 0;
  491|  2.67M|    mul_add_c(a[7], b[7], c3, c1, c2);
  ------------------
  |  |  349|  2.67M|#  define mul_add_c(a,b,c0,c1,c2) do {  \
  |  |  350|  2.67M|        BN_ULONG t1,t2;                 \
  |  |  ------------------
  |  |  |  |   37|  2.67M|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  351|  2.67M|        asm ("mulq %3"                  \
  |  |  352|  2.67M|                : "=a"(t1),"=d"(t2)     \
  |  |  353|  2.67M|                : "a"(a),"m"(b)         \
  |  |  354|  2.67M|                : "cc");                \
  |  |  355|  2.67M|        asm ("addq %3,%0; adcq %4,%1; adcq %5,%2"       \
  |  |  356|  2.67M|                : "+r"(c0),"+r"(c1),"+r"(c2)            \
  |  |  357|  2.67M|                : "r"(t1),"r"(t2),"g"(0)                \
  |  |  358|  2.67M|                : "cc");                                \
  |  |  359|  2.67M|        } while (0)
  |  |  ------------------
  |  |  |  Branch (359:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  492|  2.67M|    r[14] = c3;
  493|  2.67M|    r[15] = c1;
  494|  2.67M|}

BN_add:
   15|  2.64k|{
   16|  2.64k|    int ret, r_neg, cmp_res;
   17|       |
   18|  2.64k|    bn_check_top(a);
   19|  2.64k|    bn_check_top(b);
   20|       |
   21|  2.64k|    if (a->neg == b->neg) {
  ------------------
  |  Branch (21:9): [True: 2.32k, False: 328]
  ------------------
   22|  2.32k|        r_neg = a->neg;
   23|  2.32k|        ret = BN_uadd(r, a, b);
   24|  2.32k|    } else {
   25|    328|        cmp_res = BN_ucmp(a, b);
   26|    328|        if (cmp_res > 0) {
  ------------------
  |  Branch (26:13): [True: 192, False: 136]
  ------------------
   27|    192|            r_neg = a->neg;
   28|    192|            ret = BN_usub(r, a, b);
   29|    192|        } else if (cmp_res < 0) {
  ------------------
  |  Branch (29:20): [True: 136, False: 0]
  ------------------
   30|    136|            r_neg = b->neg;
   31|    136|            ret = BN_usub(r, b, a);
   32|    136|        } else {
   33|      0|            r_neg = 0;
   34|      0|            BN_zero(r);
  ------------------
  |  |  202|      0|#  define BN_zero(a)      BN_zero_ex(a)
  ------------------
   35|      0|            ret = 1;
   36|      0|        }
   37|    328|    }
   38|       |
   39|  2.64k|    r->neg = r_neg;
   40|  2.64k|    bn_check_top(r);
   41|  2.64k|    return ret;
   42|  2.64k|}
BN_uadd:
   77|  2.32k|{
   78|  2.32k|    int max, min, dif;
   79|  2.32k|    const BN_ULONG *ap, *bp;
   80|  2.32k|    BN_ULONG *rp, carry, t1, t2;
  ------------------
  |  |   37|  2.32k|#  define BN_ULONG        unsigned long
  ------------------
   81|       |
   82|  2.32k|    bn_check_top(a);
   83|  2.32k|    bn_check_top(b);
   84|       |
   85|  2.32k|    if (a->top < b->top) {
  ------------------
  |  Branch (85:9): [True: 44, False: 2.27k]
  ------------------
   86|     44|        const BIGNUM *tmp;
   87|       |
   88|     44|        tmp = a;
   89|     44|        a = b;
   90|     44|        b = tmp;
   91|     44|    }
   92|  2.32k|    max = a->top;
   93|  2.32k|    min = b->top;
   94|  2.32k|    dif = max - min;
   95|       |
   96|  2.32k|    if (bn_wexpand(r, max + 1) == NULL)
  ------------------
  |  Branch (96:9): [True: 0, False: 2.32k]
  ------------------
   97|      0|        return 0;
   98|       |
   99|  2.32k|    r->top = max;
  100|       |
  101|  2.32k|    ap = a->d;
  102|  2.32k|    bp = b->d;
  103|  2.32k|    rp = r->d;
  104|       |
  105|  2.32k|    carry = bn_add_words(rp, ap, bp, min);
  106|  2.32k|    rp += min;
  107|  2.32k|    ap += min;
  108|       |
  109|   857k|    while (dif) {
  ------------------
  |  Branch (109:12): [True: 854k, False: 2.32k]
  ------------------
  110|   854k|        dif--;
  111|   854k|        t1 = *(ap++);
  112|   854k|        t2 = (t1 + carry) & BN_MASK2;
  ------------------
  |  |   94|   854k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  113|   854k|        *(rp++) = t2;
  114|   854k|        carry &= (t2 == 0);
  115|   854k|    }
  116|  2.32k|    *rp = carry;
  117|  2.32k|    r->top += carry;
  118|       |
  119|  2.32k|    r->neg = 0;
  120|  2.32k|    bn_check_top(r);
  121|  2.32k|    return 1;
  122|  2.32k|}
BN_usub:
  126|    328|{
  127|    328|    int max, min, dif;
  128|    328|    BN_ULONG t1, t2, borrow, *rp;
  ------------------
  |  |   37|    328|#  define BN_ULONG        unsigned long
  ------------------
  129|    328|    const BN_ULONG *ap, *bp;
  130|       |
  131|    328|    bn_check_top(a);
  132|    328|    bn_check_top(b);
  133|       |
  134|    328|    max = a->top;
  135|    328|    min = b->top;
  136|    328|    dif = max - min;
  137|       |
  138|    328|    if (dif < 0) {              /* hmm... should not be happening */
  ------------------
  |  Branch (138:9): [True: 0, False: 328]
  ------------------
  139|      0|        ERR_raise(ERR_LIB_BN, BN_R_ARG2_LT_ARG3);
  ------------------
  |  |  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),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  300|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  140|      0|        return 0;
  141|      0|    }
  142|       |
  143|    328|    if (bn_wexpand(r, max) == NULL)
  ------------------
  |  Branch (143:9): [True: 0, False: 328]
  ------------------
  144|      0|        return 0;
  145|       |
  146|    328|    ap = a->d;
  147|    328|    bp = b->d;
  148|    328|    rp = r->d;
  149|       |
  150|    328|    borrow = bn_sub_words(rp, ap, bp, min);
  151|    328|    ap += min;
  152|    328|    rp += min;
  153|       |
  154|   104k|    while (dif) {
  ------------------
  |  Branch (154:12): [True: 103k, False: 328]
  ------------------
  155|   103k|        dif--;
  156|   103k|        t1 = *(ap++);
  157|   103k|        t2 = (t1 - borrow) & BN_MASK2;
  ------------------
  |  |   94|   103k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  158|   103k|        *(rp++) = t2;
  159|   103k|        borrow &= (t1 == 0);
  160|   103k|    }
  161|       |
  162|    328|    while (max && *--rp == 0)
  ------------------
  |  Branch (162:12): [True: 328, False: 0]
  |  Branch (162:19): [True: 0, False: 328]
  ------------------
  163|      0|        max--;
  164|       |
  165|    328|    r->top = max;
  166|    328|    r->neg = 0;
  167|    328|    bn_pollute(r);
  168|       |
  169|    328|    return 1;
  170|    328|}

BN_CTX_new_ex:
  119|      2|{
  120|      2|    BN_CTX *ret;
  121|       |
  122|      2|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |   99|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (122:9): [True: 0, False: 2]
  ------------------
  123|      0|        return NULL;
  124|       |    /* Initialise the structure */
  125|      2|    BN_POOL_init(&ret->pool);
  126|      2|    BN_STACK_init(&ret->stack);
  127|      2|    ret->libctx = ctx;
  128|      2|    return ret;
  129|      2|}
BN_CTX_new:
  133|      2|{
  134|      2|    return BN_CTX_new_ex(NULL);
  135|      2|}
BN_CTX_start:
  180|  4.80k|{
  181|  4.80k|    CTXDBG("ENTER BN_CTX_start()", ctx);
  ------------------
  |  |  110|  4.80k|    OSSL_TRACE_BEGIN(BN_CTX) {      \
  |  |  ------------------
  |  |  |  |  219|  4.80k|    do {                                        \
  |  |  |  |  220|  4.80k|        BIO *trc_out = NULL;                    \
  |  |  |  |  221|  4.80k|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|      0|        ctxdbg(trc_out, str, ctx);  \
  |  |  112|  4.80k|    } OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  4.80k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (224:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|       |    /* If we're already overflowing ... */
  183|  4.80k|    if (ctx->err_stack || ctx->too_many)
  ------------------
  |  Branch (183:9): [True: 0, False: 4.80k]
  |  Branch (183:27): [True: 0, False: 4.80k]
  ------------------
  184|      0|        ctx->err_stack++;
  185|       |    /* (Try to) get a new frame pointer */
  186|  4.80k|    else if (!BN_STACK_push(&ctx->stack, ctx->used)) {
  ------------------
  |  Branch (186:14): [True: 0, False: 4.80k]
  ------------------
  187|      0|        ERR_raise(ERR_LIB_BN, BN_R_TOO_MANY_TEMPORARY_VARIABLES);
  ------------------
  |  |  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),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  300|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  188|      0|        ctx->err_stack++;
  189|      0|    }
  190|  4.80k|    CTXDBG("LEAVE BN_CTX_start()", ctx);
  ------------------
  |  |  110|  4.80k|    OSSL_TRACE_BEGIN(BN_CTX) {      \
  |  |  ------------------
  |  |  |  |  219|  4.80k|    do {                                        \
  |  |  |  |  220|  4.80k|        BIO *trc_out = NULL;                    \
  |  |  |  |  221|  4.80k|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|      0|        ctxdbg(trc_out, str, ctx);  \
  |  |  112|  4.80k|    } OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  4.80k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (224:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  191|  4.80k|}
BN_CTX_end:
  194|  4.80k|{
  195|  4.80k|    if (ctx == NULL)
  ------------------
  |  Branch (195:9): [True: 0, False: 4.80k]
  ------------------
  196|      0|        return;
  197|  4.80k|    CTXDBG("ENTER BN_CTX_end()", ctx);
  ------------------
  |  |  110|  4.80k|    OSSL_TRACE_BEGIN(BN_CTX) {      \
  |  |  ------------------
  |  |  |  |  219|  4.80k|    do {                                        \
  |  |  |  |  220|  4.80k|        BIO *trc_out = NULL;                    \
  |  |  |  |  221|  4.80k|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|      0|        ctxdbg(trc_out, str, ctx);  \
  |  |  112|  4.80k|    } OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  4.80k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (224:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  198|  4.80k|    if (ctx->err_stack)
  ------------------
  |  Branch (198:9): [True: 0, False: 4.80k]
  ------------------
  199|      0|        ctx->err_stack--;
  200|  4.80k|    else {
  201|  4.80k|        unsigned int fp = BN_STACK_pop(&ctx->stack);
  202|       |        /* Does this stack frame have anything to release? */
  203|  4.80k|        if (fp < ctx->used)
  ------------------
  |  Branch (203:13): [True: 3.71k, False: 1.09k]
  ------------------
  204|  3.71k|            BN_POOL_release(&ctx->pool, ctx->used - fp);
  205|  4.80k|        ctx->used = fp;
  206|       |        /* Unjam "too_many" in case "get" had failed */
  207|  4.80k|        ctx->too_many = 0;
  208|  4.80k|    }
  209|  4.80k|    CTXDBG("LEAVE BN_CTX_end()", ctx);
  ------------------
  |  |  110|  4.80k|    OSSL_TRACE_BEGIN(BN_CTX) {      \
  |  |  ------------------
  |  |  |  |  219|  4.80k|    do {                                        \
  |  |  |  |  220|  4.80k|        BIO *trc_out = NULL;                    \
  |  |  |  |  221|  4.80k|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|      0|        ctxdbg(trc_out, str, ctx);  \
  |  |  112|  4.80k|    } OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  4.80k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (224:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|  4.80k|}
BN_CTX_get:
  213|  9.00k|{
  214|  9.00k|    BIGNUM *ret;
  215|       |
  216|  9.00k|    CTXDBG("ENTER BN_CTX_get()", ctx);
  ------------------
  |  |  110|  9.00k|    OSSL_TRACE_BEGIN(BN_CTX) {      \
  |  |  ------------------
  |  |  |  |  219|  9.00k|    do {                                        \
  |  |  |  |  220|  9.00k|        BIO *trc_out = NULL;                    \
  |  |  |  |  221|  9.00k|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|      0|        ctxdbg(trc_out, str, ctx);  \
  |  |  112|  9.00k|    } OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  9.00k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (224:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  217|  9.00k|    if (ctx->err_stack || ctx->too_many)
  ------------------
  |  Branch (217:9): [True: 0, False: 9.00k]
  |  Branch (217:27): [True: 0, False: 9.00k]
  ------------------
  218|      0|        return NULL;
  219|  9.00k|    if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {
  ------------------
  |  Branch (219:9): [True: 0, False: 9.00k]
  ------------------
  220|       |        /*
  221|       |         * Setting too_many prevents repeated "get" attempts from cluttering
  222|       |         * the error stack.
  223|       |         */
  224|      0|        ctx->too_many = 1;
  225|      0|        ERR_raise(ERR_LIB_BN, BN_R_TOO_MANY_TEMPORARY_VARIABLES);
  ------------------
  |  |  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),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  300|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  226|      0|        return NULL;
  227|      0|    }
  228|       |    /* OK, make sure the returned bignum is "zero" */
  229|  9.00k|    BN_zero(ret);
  ------------------
  |  |  202|  9.00k|#  define BN_zero(a)      BN_zero_ex(a)
  ------------------
  230|       |    /* clear BN_FLG_CONSTTIME if leaked from previous frames */
  231|  9.00k|    ret->flags &= (~BN_FLG_CONSTTIME);
  ------------------
  |  |   67|  9.00k|# define BN_FLG_CONSTTIME        0x04
  ------------------
  232|  9.00k|    ctx->used++;
  233|  9.00k|    CTXDBG("LEAVE BN_CTX_get()", ctx);
  ------------------
  |  |  110|  9.00k|    OSSL_TRACE_BEGIN(BN_CTX) {      \
  |  |  ------------------
  |  |  |  |  219|  9.00k|    do {                                        \
  |  |  |  |  220|  9.00k|        BIO *trc_out = NULL;                    \
  |  |  |  |  221|  9.00k|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|      0|        ctxdbg(trc_out, str, ctx);  \
  |  |  112|  9.00k|    } OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  9.00k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (224:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  234|  9.00k|    return ret;
  235|  9.00k|}
bn_ctx.c:BN_STACK_init:
  249|      2|{
  250|      2|    st->indexes = NULL;
  251|      2|    st->depth = st->size = 0;
  252|      2|}
bn_ctx.c:BN_STACK_push:
  262|  4.80k|{
  263|  4.80k|    if (st->depth == st->size) {
  ------------------
  |  Branch (263:9): [True: 1, False: 4.80k]
  ------------------
  264|       |        /* Need to expand */
  265|      1|        unsigned int newsize =
  266|      1|            st->size ? (st->size * 3 / 2) : BN_CTX_START_FRAMES;
  ------------------
  |  |   17|      1|#define BN_CTX_START_FRAMES     32
  ------------------
  |  Branch (266:13): [True: 0, False: 1]
  ------------------
  267|      1|        unsigned int *newitems;
  268|       |
  269|      1|        if ((newitems = OPENSSL_malloc(sizeof(*newitems) * newsize)) == NULL)
  ------------------
  |  |   97|      1|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      1|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      1|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (269:13): [True: 0, False: 1]
  ------------------
  270|      0|            return 0;
  271|      1|        if (st->depth)
  ------------------
  |  Branch (271:13): [True: 0, False: 1]
  ------------------
  272|      0|            memcpy(newitems, st->indexes, sizeof(*newitems) * st->depth);
  273|      1|        OPENSSL_free(st->indexes);
  ------------------
  |  |  107|      1|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      1|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      1|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  274|      1|        st->indexes = newitems;
  275|      1|        st->size = newsize;
  276|      1|    }
  277|  4.80k|    st->indexes[(st->depth)++] = idx;
  278|  4.80k|    return 1;
  279|  4.80k|}
bn_ctx.c:BN_STACK_pop:
  282|  4.80k|{
  283|  4.80k|    return st->indexes[--(st->depth)];
  284|  4.80k|}
bn_ctx.c:BN_POOL_init:
  291|      2|{
  292|      2|    p->head = p->current = p->tail = NULL;
  293|      2|    p->used = p->size = 0;
  294|      2|}
bn_ctx.c:BN_POOL_get:
  313|  9.00k|{
  314|  9.00k|    BIGNUM *bn;
  315|  9.00k|    unsigned int loop;
  316|       |
  317|       |    /* Full; allocate a new pool item and link it in. */
  318|  9.00k|    if (p->used == p->size) {
  ------------------
  |  Branch (318:9): [True: 1, False: 9.00k]
  ------------------
  319|      1|        BN_POOL_ITEM *item;
  320|       |
  321|      1|        if ((item = OPENSSL_malloc(sizeof(*item))) == NULL)
  ------------------
  |  |   97|      1|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      1|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      1|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (321:13): [True: 0, False: 1]
  ------------------
  322|      0|            return NULL;
  323|     17|        for (loop = 0, bn = item->vals; loop++ < BN_CTX_POOL_SIZE; bn++) {
  ------------------
  |  |   15|     17|#define BN_CTX_POOL_SIZE        16
  ------------------
  |  Branch (323:41): [True: 16, False: 1]
  ------------------
  324|     16|            bn_init(bn);
  325|     16|            if ((flag & BN_FLG_SECURE) != 0)
  ------------------
  |  |   68|     16|# define BN_FLG_SECURE           0x08
  ------------------
  |  Branch (325:17): [True: 0, False: 16]
  ------------------
  326|      0|                BN_set_flags(bn, BN_FLG_SECURE);
  ------------------
  |  |   68|      0|# define BN_FLG_SECURE           0x08
  ------------------
  327|     16|        }
  328|      1|        item->prev = p->tail;
  329|      1|        item->next = NULL;
  330|       |
  331|      1|        if (p->head == NULL)
  ------------------
  |  Branch (331:13): [True: 1, False: 0]
  ------------------
  332|      1|            p->head = p->current = p->tail = item;
  333|      0|        else {
  334|      0|            p->tail->next = item;
  335|      0|            p->tail = item;
  336|      0|            p->current = item;
  337|      0|        }
  338|      1|        p->size += BN_CTX_POOL_SIZE;
  ------------------
  |  |   15|      1|#define BN_CTX_POOL_SIZE        16
  ------------------
  339|      1|        p->used++;
  340|       |        /* Return the first bignum from the new pool */
  341|      1|        return item->vals;
  342|      1|    }
  343|       |
  344|  9.00k|    if (!p->used)
  ------------------
  |  Branch (344:9): [True: 3.71k, False: 5.29k]
  ------------------
  345|  3.71k|        p->current = p->head;
  346|  5.29k|    else if ((p->used % BN_CTX_POOL_SIZE) == 0)
  ------------------
  |  |   15|  5.29k|#define BN_CTX_POOL_SIZE        16
  ------------------
  |  Branch (346:14): [True: 0, False: 5.29k]
  ------------------
  347|      0|        p->current = p->current->next;
  348|  9.00k|    return p->current->vals + ((p->used++) % BN_CTX_POOL_SIZE);
  ------------------
  |  |   15|  9.00k|#define BN_CTX_POOL_SIZE        16
  ------------------
  349|  9.00k|}
bn_ctx.c:BN_POOL_release:
  352|  3.71k|{
  353|  3.71k|    unsigned int offset = (p->used - 1) % BN_CTX_POOL_SIZE;
  ------------------
  |  |   15|  3.71k|#define BN_CTX_POOL_SIZE        16
  ------------------
  354|       |
  355|  3.71k|    p->used -= num;
  356|  12.7k|    while (num--) {
  ------------------
  |  Branch (356:12): [True: 9.00k, False: 3.71k]
  ------------------
  357|  9.00k|        bn_check_top(p->current->vals + offset);
  358|  9.00k|        if (offset == 0) {
  ------------------
  |  Branch (358:13): [True: 3.71k, False: 5.29k]
  ------------------
  359|  3.71k|            offset = BN_CTX_POOL_SIZE - 1;
  ------------------
  |  |   15|  3.71k|#define BN_CTX_POOL_SIZE        16
  ------------------
  360|  3.71k|            p->current = p->current->prev;
  361|  3.71k|        } else
  362|  5.29k|            offset--;
  363|  9.00k|    }
  364|  3.71k|}

BN_div:
  211|  2.64k|{
  212|  2.64k|    int ret;
  213|       |
  214|  2.64k|    if (BN_is_zero(divisor)) {
  ------------------
  |  Branch (214:9): [True: 0, False: 2.64k]
  ------------------
  215|      0|        ERR_raise(ERR_LIB_BN, BN_R_DIV_BY_ZERO);
  ------------------
  |  |  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),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  300|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  216|      0|        return 0;
  217|      0|    }
  218|       |
  219|       |    /*
  220|       |     * Invalid zero-padding would have particularly bad consequences so don't
  221|       |     * just rely on bn_check_top() here (bn_check_top() works only for
  222|       |     * BN_DEBUG builds)
  223|       |     */
  224|  2.64k|    if (divisor->d[divisor->top - 1] == 0) {
  ------------------
  |  Branch (224:9): [True: 0, False: 2.64k]
  ------------------
  225|      0|        ERR_raise(ERR_LIB_BN, BN_R_NOT_INITIALIZED);
  ------------------
  |  |  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),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  300|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  226|      0|        return 0;
  227|      0|    }
  228|       |
  229|  2.64k|    ret = bn_div_fixed_top(dv, rm, num, divisor, ctx);
  230|       |
  231|  2.64k|    if (ret) {
  ------------------
  |  Branch (231:9): [True: 2.64k, False: 0]
  ------------------
  232|  2.64k|        if (dv != NULL)
  ------------------
  |  Branch (232:13): [True: 2.64k, False: 0]
  ------------------
  233|  2.64k|            bn_correct_top(dv);
  234|  2.64k|        if (rm != NULL)
  ------------------
  |  Branch (234:13): [True: 2.64k, False: 0]
  ------------------
  235|  2.64k|            bn_correct_top(rm);
  236|  2.64k|    }
  237|       |
  238|  2.64k|    return ret;
  239|  2.64k|}
bn_div_fixed_top:
  266|  2.64k|{
  267|  2.64k|    int norm_shift, i, j, loop;
  268|  2.64k|    BIGNUM *tmp, *snum, *sdiv, *res;
  269|  2.64k|    BN_ULONG *resp, *wnum, *wnumtop;
  ------------------
  |  |   37|  2.64k|#  define BN_ULONG        unsigned long
  ------------------
  270|  2.64k|    BN_ULONG d0, d1;
  ------------------
  |  |   37|  2.64k|#  define BN_ULONG        unsigned long
  ------------------
  271|  2.64k|    int num_n, div_n, num_neg;
  272|       |
  273|  2.64k|    assert(divisor->top > 0 && divisor->d[divisor->top - 1] != 0);
  274|       |
  275|  2.64k|    bn_check_top(num);
  276|  2.64k|    bn_check_top(divisor);
  277|  2.64k|    bn_check_top(dv);
  278|  2.64k|    bn_check_top(rm);
  279|       |
  280|  2.64k|    BN_CTX_start(ctx);
  281|  2.64k|    res = (dv == NULL) ? BN_CTX_get(ctx) : dv;
  ------------------
  |  Branch (281:11): [True: 0, False: 2.64k]
  ------------------
  282|  2.64k|    tmp = BN_CTX_get(ctx);
  283|  2.64k|    snum = BN_CTX_get(ctx);
  284|  2.64k|    sdiv = BN_CTX_get(ctx);
  285|  2.64k|    if (sdiv == NULL)
  ------------------
  |  Branch (285:9): [True: 0, False: 2.64k]
  ------------------
  286|      0|        goto err;
  287|       |
  288|       |    /* First we normalise the numbers */
  289|  2.64k|    if (!BN_copy(sdiv, divisor))
  ------------------
  |  Branch (289:9): [True: 0, False: 2.64k]
  ------------------
  290|      0|        goto err;
  291|  2.64k|    norm_shift = bn_left_align(sdiv);
  292|  2.64k|    sdiv->neg = 0;
  293|       |    /*
  294|       |     * Note that bn_lshift_fixed_top's output is always one limb longer
  295|       |     * than input, even when norm_shift is zero. This means that amount of
  296|       |     * inner loop iterations is invariant of dividend value, and that one
  297|       |     * doesn't need to compare dividend and divisor if they were originally
  298|       |     * of the same bit length.
  299|       |     */
  300|  2.64k|    if (!(bn_lshift_fixed_top(snum, num, norm_shift)))
  ------------------
  |  Branch (300:9): [True: 0, False: 2.64k]
  ------------------
  301|      0|        goto err;
  302|       |
  303|  2.64k|    div_n = sdiv->top;
  304|  2.64k|    num_n = snum->top;
  305|       |
  306|  2.64k|    if (num_n <= div_n) {
  ------------------
  |  Branch (306:9): [True: 410, False: 2.23k]
  ------------------
  307|       |        /* caller didn't pad dividend -> no constant-time guarantee... */
  308|    410|        if (bn_wexpand(snum, div_n + 1) == NULL)
  ------------------
  |  Branch (308:13): [True: 0, False: 410]
  ------------------
  309|      0|            goto err;
  310|    410|        memset(&(snum->d[num_n]), 0, (div_n - num_n + 1) * sizeof(BN_ULONG));
  311|    410|        snum->top = num_n = div_n + 1;
  312|    410|    }
  313|       |
  314|  2.64k|    loop = num_n - div_n;
  315|       |    /*
  316|       |     * Lets setup a 'window' into snum This is the part that corresponds to
  317|       |     * the current 'area' being divided
  318|       |     */
  319|  2.64k|    wnum = &(snum->d[loop]);
  320|  2.64k|    wnumtop = &(snum->d[num_n - 1]);
  321|       |
  322|       |    /* Get the top 2 words of sdiv */
  323|  2.64k|    d0 = sdiv->d[div_n - 1];
  324|  2.64k|    d1 = (div_n == 1) ? 0 : sdiv->d[div_n - 2];
  ------------------
  |  Branch (324:10): [True: 671, False: 1.97k]
  ------------------
  325|       |
  326|       |    /* Setup quotient */
  327|  2.64k|    if (!bn_wexpand(res, loop))
  ------------------
  |  Branch (327:9): [True: 0, False: 2.64k]
  ------------------
  328|      0|        goto err;
  329|  2.64k|    num_neg = num->neg;
  330|  2.64k|    res->neg = (num_neg ^ divisor->neg);
  331|  2.64k|    res->top = loop;
  332|  2.64k|    res->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  226|  2.64k|#  define BN_FLG_FIXED_TOP 0
  ------------------
  333|  2.64k|    resp = &(res->d[loop]);
  334|       |
  335|       |    /* space for temp */
  336|  2.64k|    if (!bn_wexpand(tmp, (div_n + 1)))
  ------------------
  |  Branch (336:9): [True: 0, False: 2.64k]
  ------------------
  337|      0|        goto err;
  338|       |
  339|   938k|    for (i = 0; i < loop; i++, wnumtop--) {
  ------------------
  |  Branch (339:17): [True: 936k, False: 2.64k]
  ------------------
  340|   936k|        BN_ULONG q, l0;
  ------------------
  |  |   37|   936k|#  define BN_ULONG        unsigned long
  ------------------
  341|       |        /*
  342|       |         * the first part of the loop uses the top two words of snum and sdiv
  343|       |         * to calculate a BN_ULONG q such that | wnum - sdiv * q | < sdiv
  344|       |         */
  345|       |# if defined(BN_DIV3W)
  346|       |        q = bn_div_3_words(wnumtop, d1, d0);
  347|       |# else
  348|   936k|        BN_ULONG n0, n1, rem = 0;
  ------------------
  |  |   37|   936k|#  define BN_ULONG        unsigned long
  ------------------
  349|       |
  350|   936k|        n0 = wnumtop[0];
  351|   936k|        n1 = wnumtop[-1];
  352|   936k|        if (n0 == d0)
  ------------------
  |  Branch (352:13): [True: 7.15k, False: 928k]
  ------------------
  353|  7.15k|            q = BN_MASK2;
  ------------------
  |  |   94|  7.15k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  354|   928k|        else {                  /* n0 < d0 */
  355|   928k|            BN_ULONG n2 = (wnumtop == wnum) ? 0 : wnumtop[-2];
  ------------------
  |  |   37|   928k|#  define BN_ULONG        unsigned long
  ------------------
  |  Branch (355:27): [True: 182k, False: 746k]
  ------------------
  356|       |#  ifdef BN_LLONG
  357|       |            BN_ULLONG t2;
  358|       |
  359|       |#   if defined(BN_LLONG) && defined(BN_DIV2W) && !defined(bn_div_words)
  360|       |            q = (BN_ULONG)(((((BN_ULLONG) n0) << BN_BITS2) | n1) / d0);
  361|       |#   else
  362|       |            q = bn_div_words(n0, n1, d0);
  363|       |#   endif
  364|       |
  365|       |#   ifndef REMAINDER_IS_ALREADY_CALCULATED
  366|       |            /*
  367|       |             * rem doesn't have to be BN_ULLONG. The least we
  368|       |             * know it's less that d0, isn't it?
  369|       |             */
  370|       |            rem = (n1 - q * d0) & BN_MASK2;
  371|       |#   endif
  372|       |            t2 = (BN_ULLONG) d1 *q;
  373|       |
  374|       |            for (;;) {
  375|       |                if (t2 <= ((((BN_ULLONG) rem) << BN_BITS2) | n2))
  376|       |                    break;
  377|       |                q--;
  378|       |                rem += d0;
  379|       |                if (rem < d0)
  380|       |                    break;      /* don't let rem overflow */
  381|       |                t2 -= d1;
  382|       |            }
  383|       |#  else                         /* !BN_LLONG */
  384|   928k|            BN_ULONG t2l, t2h;
  ------------------
  |  |   37|   928k|#  define BN_ULONG        unsigned long
  ------------------
  385|       |
  386|   928k|            q = bn_div_words(n0, n1, d0);
  387|   928k|#   ifndef REMAINDER_IS_ALREADY_CALCULATED
  388|   928k|            rem = (n1 - q * d0) & BN_MASK2;
  ------------------
  |  |   94|   928k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  389|   928k|#   endif
  390|       |
  391|       |#   if defined(BN_UMULT_LOHI)
  392|       |            BN_UMULT_LOHI(t2l, t2h, d1, q);
  393|       |#   elif defined(BN_UMULT_HIGH)
  394|       |            t2l = d1 * q;
  395|       |            t2h = BN_UMULT_HIGH(d1, q);
  396|       |#   else
  397|   928k|            {
  398|   928k|                BN_ULONG ql, qh;
  ------------------
  |  |   37|   928k|#  define BN_ULONG        unsigned long
  ------------------
  399|   928k|                t2l = LBITS(d1);
  ------------------
  |  |  566|   928k|#  define LBITS(a)        ((a)&BN_MASK2l)
  |  |  ------------------
  |  |  |  |   95|   928k|#  define BN_MASK2l       (0xffffffffL)
  |  |  ------------------
  ------------------
  400|   928k|                t2h = HBITS(d1);
  ------------------
  |  |  567|   928k|#  define HBITS(a)        (((a)>>BN_BITS4)&BN_MASK2l)
  |  |  ------------------
  |  |  |  |   93|   928k|#  define BN_BITS4        32
  |  |  ------------------
  |  |               #  define HBITS(a)        (((a)>>BN_BITS4)&BN_MASK2l)
  |  |  ------------------
  |  |  |  |   95|   928k|#  define BN_MASK2l       (0xffffffffL)
  |  |  ------------------
  ------------------
  401|   928k|                ql = LBITS(q);
  ------------------
  |  |  566|   928k|#  define LBITS(a)        ((a)&BN_MASK2l)
  |  |  ------------------
  |  |  |  |   95|   928k|#  define BN_MASK2l       (0xffffffffL)
  |  |  ------------------
  ------------------
  402|   928k|                qh = HBITS(q);
  ------------------
  |  |  567|   928k|#  define HBITS(a)        (((a)>>BN_BITS4)&BN_MASK2l)
  |  |  ------------------
  |  |  |  |   93|   928k|#  define BN_BITS4        32
  |  |  ------------------
  |  |               #  define HBITS(a)        (((a)>>BN_BITS4)&BN_MASK2l)
  |  |  ------------------
  |  |  |  |   95|   928k|#  define BN_MASK2l       (0xffffffffL)
  |  |  ------------------
  ------------------
  403|   928k|                mul64(t2l, t2h, ql, qh); /* t2=(BN_ULLONG)d1*q; */
  ------------------
  |  |  575|   928k|        { \
  |  |  576|   928k|        BN_ULONG m,m1,lt,ht; \
  |  |  ------------------
  |  |  |  |   37|   928k|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  577|   928k| \
  |  |  578|   928k|        lt=l; \
  |  |  579|   928k|        ht=h; \
  |  |  580|   928k|        m =(bh)*(lt); \
  |  |  581|   928k|        lt=(bl)*(lt); \
  |  |  582|   928k|        m1=(bl)*(ht); \
  |  |  583|   928k|        ht =(bh)*(ht); \
  |  |  584|   928k|        m=(m+m1)&BN_MASK2; ht += L2HBITS((BN_ULONG)(m < m1)); \
  |  |  ------------------
  |  |  |  |   94|   928k|#  define BN_MASK2        (0xffffffffffffffffL)
  |  |  ------------------
  |  |                       m=(m+m1)&BN_MASK2; ht += L2HBITS((BN_ULONG)(m < m1)); \
  |  |  ------------------
  |  |  |  |  568|   928k|#  define L2HBITS(a)      (((a)<<BN_BITS4)&BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|   928k|#  define BN_BITS4        32
  |  |  |  |  ------------------
  |  |  |  |               #  define L2HBITS(a)      (((a)<<BN_BITS4)&BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   94|   928k|#  define BN_MASK2        (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  585|   928k|        ht+=HBITS(m); \
  |  |  ------------------
  |  |  |  |  567|   928k|#  define HBITS(a)        (((a)>>BN_BITS4)&BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|   928k|#  define BN_BITS4        32
  |  |  |  |  ------------------
  |  |  |  |               #  define HBITS(a)        (((a)>>BN_BITS4)&BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   928k|#  define BN_MASK2l       (0xffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  586|   928k|        m1=L2HBITS(m); \
  |  |  ------------------
  |  |  |  |  568|   928k|#  define L2HBITS(a)      (((a)<<BN_BITS4)&BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   93|   928k|#  define BN_BITS4        32
  |  |  |  |  ------------------
  |  |  |  |               #  define L2HBITS(a)      (((a)<<BN_BITS4)&BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   94|   928k|#  define BN_MASK2        (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  587|   928k|        lt=(lt+m1)&BN_MASK2; ht += (lt < m1); \
  |  |  ------------------
  |  |  |  |   94|   928k|#  define BN_MASK2        (0xffffffffffffffffL)
  |  |  ------------------
  |  |  588|   928k|        (l)=lt; \
  |  |  589|   928k|        (h)=ht; \
  |  |  590|   928k|        }
  ------------------
  404|   928k|            }
  405|   928k|#   endif
  406|       |
  407|   957k|            for (;;) {
  408|   957k|                if ((t2h < rem) || ((t2h == rem) && (t2l <= n2)))
  ------------------
  |  Branch (408:21): [True: 703k, False: 253k]
  |  Branch (408:37): [True: 134k, False: 118k]
  |  Branch (408:53): [True: 134k, False: 118]
  ------------------
  409|   838k|                    break;
  410|   119k|                q--;
  411|   119k|                rem += d0;
  412|   119k|                if (rem < d0)
  ------------------
  |  Branch (412:21): [True: 90.6k, False: 28.3k]
  ------------------
  413|  90.6k|                    break;      /* don't let rem overflow */
  414|  28.3k|                if (t2l < d1)
  ------------------
  |  Branch (414:21): [True: 20.6k, False: 7.76k]
  ------------------
  415|  20.6k|                    t2h--;
  416|  28.3k|                t2l -= d1;
  417|  28.3k|            }
  418|   928k|#  endif                        /* !BN_LLONG */
  419|   928k|        }
  420|   936k|# endif                         /* !BN_DIV3W */
  421|       |
  422|   936k|        l0 = bn_mul_words(tmp->d, sdiv->d, div_n, q);
  423|   936k|        tmp->d[div_n] = l0;
  424|   936k|        wnum--;
  425|       |        /*
  426|       |         * ignore top values of the bignums just sub the two BN_ULONG arrays
  427|       |         * with bn_sub_words
  428|       |         */
  429|   936k|        l0 = bn_sub_words(wnum, wnum, tmp->d, div_n + 1);
  430|   936k|        q -= l0;
  431|       |        /*
  432|       |         * Note: As we have considered only the leading two BN_ULONGs in
  433|       |         * the calculation of q, sdiv * q might be greater than wnum (but
  434|       |         * then (q-1) * sdiv is less or equal than wnum)
  435|       |         */
  436|  3.14G|        for (l0 = 0 - l0, j = 0; j < div_n; j++)
  ------------------
  |  Branch (436:34): [True: 3.13G, False: 936k]
  ------------------
  437|  3.13G|            tmp->d[j] = sdiv->d[j] & l0;
  438|   936k|        l0 = bn_add_words(wnum, wnum, tmp->d, div_n);
  439|   936k|        (*wnumtop) += l0;
  440|   936k|        assert((*wnumtop) == 0);
  441|       |
  442|       |        /* store part of the result */
  443|   936k|        *--resp = q;
  444|   936k|    }
  445|       |    /* snum holds remainder, it's as wide as divisor */
  446|  2.64k|    snum->neg = num_neg;
  447|  2.64k|    snum->top = div_n;
  448|  2.64k|    snum->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  226|  2.64k|#  define BN_FLG_FIXED_TOP 0
  ------------------
  449|       |
  450|  2.64k|    if (rm != NULL && bn_rshift_fixed_top(rm, snum, norm_shift) == 0)
  ------------------
  |  Branch (450:9): [True: 2.64k, False: 0]
  |  Branch (450:23): [True: 0, False: 2.64k]
  ------------------
  451|      0|        goto err;
  452|       |
  453|  2.64k|    BN_CTX_end(ctx);
  454|  2.64k|    return 1;
  455|      0| err:
  456|      0|    bn_check_top(rm);
  457|      0|    BN_CTX_end(ctx);
  458|      0|    return 0;
  459|  2.64k|}
bn_div.c:bn_left_align:
  142|  2.64k|{
  143|  2.64k|    BN_ULONG *d = num->d, n, m, rmask;
  ------------------
  |  |   37|  2.64k|#  define BN_ULONG        unsigned long
  ------------------
  144|  2.64k|    int top = num->top;
  145|  2.64k|    int rshift = BN_num_bits_word(d[top - 1]), lshift, i;
  146|       |
  147|  2.64k|    lshift = BN_BITS2 - rshift;
  ------------------
  |  |   54|  2.64k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.64k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  148|  2.64k|    rshift %= BN_BITS2;            /* say no to undefined behaviour */
  ------------------
  |  |   54|  2.64k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.64k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  149|  2.64k|    rmask = (BN_ULONG)0 - rshift;  /* rmask = 0 - (rshift != 0) */
  150|  2.64k|    rmask |= rmask >> 8;
  151|       |
  152|  1.01M|    for (i = 0, m = 0; i < top; i++) {
  ------------------
  |  Branch (152:24): [True: 1.00M, False: 2.64k]
  ------------------
  153|  1.00M|        n = d[i];
  154|  1.00M|        d[i] = ((n << lshift) | m) & BN_MASK2;
  ------------------
  |  |   94|  1.00M|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  155|  1.00M|        m = (n >> rshift) & rmask;
  156|  1.00M|    }
  157|       |
  158|  2.64k|    return lshift;
  159|  2.64k|}

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|}

BN_num_bits_word:
  101|  3.71k|{
  102|  3.71k|    BN_ULONG x, mask;
  ------------------
  |  |   37|  3.71k|#  define BN_ULONG        unsigned long
  ------------------
  103|  3.71k|    int bits = (l != 0);
  104|       |
  105|  3.71k|#if BN_BITS2 > 32
  106|  3.71k|    x = l >> 32;
  107|  3.71k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   94|  3.71k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  108|  3.71k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  3.71k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.71k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  109|  3.71k|    bits += 32 & mask;
  110|  3.71k|    l ^= (x ^ l) & mask;
  111|  3.71k|#endif
  112|       |
  113|  3.71k|    x = l >> 16;
  114|  3.71k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   94|  3.71k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  115|  3.71k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  3.71k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.71k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  116|  3.71k|    bits += 16 & mask;
  117|  3.71k|    l ^= (x ^ l) & mask;
  118|       |
  119|  3.71k|    x = l >> 8;
  120|  3.71k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   94|  3.71k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  121|  3.71k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  3.71k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.71k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  122|  3.71k|    bits += 8 & mask;
  123|  3.71k|    l ^= (x ^ l) & mask;
  124|       |
  125|  3.71k|    x = l >> 4;
  126|  3.71k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   94|  3.71k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  127|  3.71k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  3.71k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.71k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  128|  3.71k|    bits += 4 & mask;
  129|  3.71k|    l ^= (x ^ l) & mask;
  130|       |
  131|  3.71k|    x = l >> 2;
  132|  3.71k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   94|  3.71k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  133|  3.71k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  3.71k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.71k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  134|  3.71k|    bits += 2 & mask;
  135|  3.71k|    l ^= (x ^ l) & mask;
  136|       |
  137|  3.71k|    x = l >> 1;
  138|  3.71k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   94|  3.71k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  139|  3.71k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  3.71k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.71k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  140|  3.71k|    bits += 1 & mask;
  141|       |
  142|  3.71k|    return bits;
  143|  3.71k|}
bn_init:
  236|     16|{
  237|     16|    static BIGNUM nilbn;
  238|       |
  239|     16|    *a = nilbn;
  240|     16|    bn_check_top(a);
  241|     16|}
BN_new:
  244|     10|{
  245|     10|    BIGNUM *ret;
  246|       |
  247|     10|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |   99|     10|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|     10|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|     10|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (247:9): [True: 0, False: 10]
  ------------------
  248|      0|        return NULL;
  249|     10|    ret->flags = BN_FLG_MALLOCED;
  ------------------
  |  |   58|     10|# define BN_FLG_MALLOCED         0x01
  ------------------
  250|     10|    bn_check_top(ret);
  251|     10|    return ret;
  252|     10|}
bn_expand2:
  299|    672|{
  300|    672|    if (words > b->dmax) {
  ------------------
  |  Branch (300:9): [True: 672, False: 0]
  ------------------
  301|    672|        BN_ULONG *a = bn_expand_internal(b, words);
  ------------------
  |  |   37|    672|#  define BN_ULONG        unsigned long
  ------------------
  302|    672|        if (!a)
  ------------------
  |  Branch (302:13): [True: 0, False: 672]
  ------------------
  303|      0|            return NULL;
  304|    672|        if (b->d != NULL)
  ------------------
  |  Branch (304:13): [True: 664, False: 8]
  ------------------
  305|    664|            bn_free_d(b, 1);
  306|    672|        b->d = a;
  307|    672|        b->dmax = words;
  308|    672|    }
  309|       |
  310|    672|    return b;
  311|    672|}
BN_copy:
  333|  2.64k|{
  334|  2.64k|    int bn_words;
  335|       |
  336|  2.64k|    bn_check_top(b);
  337|       |
  338|  2.64k|    bn_words = BN_get_flags(b, BN_FLG_CONSTTIME) ? b->dmax : b->top;
  ------------------
  |  |   67|  2.64k|# define BN_FLG_CONSTTIME        0x04
  ------------------
  |  Branch (338:16): [True: 0, False: 2.64k]
  ------------------
  339|       |
  340|  2.64k|    if (a == b)
  ------------------
  |  Branch (340:9): [True: 0, False: 2.64k]
  ------------------
  341|      0|        return a;
  342|  2.64k|    if (bn_wexpand(a, bn_words) == NULL)
  ------------------
  |  Branch (342:9): [True: 0, False: 2.64k]
  ------------------
  343|      0|        return NULL;
  344|       |
  345|  2.64k|    if (b->top > 0)
  ------------------
  |  Branch (345:9): [True: 2.64k, False: 0]
  ------------------
  346|  2.64k|        memcpy(a->d, b->d, sizeof(b->d[0]) * bn_words);
  347|       |
  348|  2.64k|    a->neg = b->neg;
  349|  2.64k|    a->top = b->top;
  350|  2.64k|    a->flags |= b->flags & BN_FLG_FIXED_TOP;
  ------------------
  |  |  226|  2.64k|#  define BN_FLG_FIXED_TOP 0
  ------------------
  351|  2.64k|    bn_check_top(a);
  352|  2.64k|    return a;
  353|  2.64k|}
BN_clear:
  395|    335|{
  396|    335|    if (a == NULL)
  ------------------
  |  Branch (396:9): [True: 0, False: 335]
  ------------------
  397|      0|        return;
  398|    335|    bn_check_top(a);
  399|    335|    if (a->d != NULL)
  ------------------
  |  Branch (399:9): [True: 320, False: 15]
  ------------------
  400|    320|        OPENSSL_cleanse(a->d, sizeof(*a->d) * a->dmax);
  401|    335|    a->neg = 0;
  402|    335|    a->top = 0;
  403|    335|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  226|    335|#  define BN_FLG_FIXED_TOP 0
  ------------------
  404|    335|}
BN_bin2bn:
  535|  5.34k|{
  536|  5.34k|    return bin2bn(s, len, ret, BIG, UNSIGNED);
  537|  5.34k|}
BN_ucmp:
  707|    328|{
  708|    328|    int i;
  709|    328|    BN_ULONG t1, t2, *ap, *bp;
  ------------------
  |  |   37|    328|#  define BN_ULONG        unsigned long
  ------------------
  710|       |
  711|    328|    bn_check_top(a);
  712|    328|    bn_check_top(b);
  713|       |
  714|    328|    i = a->top - b->top;
  715|    328|    if (i != 0)
  ------------------
  |  Branch (715:9): [True: 328, False: 0]
  ------------------
  716|    328|        return i;
  717|      0|    ap = a->d;
  718|      0|    bp = b->d;
  719|      0|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (719:26): [True: 0, False: 0]
  ------------------
  720|      0|        t1 = ap[i];
  721|      0|        t2 = bp[i];
  722|      0|        if (t1 != t2)
  ------------------
  |  Branch (722:13): [True: 0, False: 0]
  ------------------
  723|      0|            return ((t1 > t2) ? 1 : -1);
  ------------------
  |  Branch (723:21): [True: 0, False: 0]
  ------------------
  724|      0|    }
  725|      0|    return 0;
  726|      0|}
BN_cmp:
  729|  2.64k|{
  730|  2.64k|    int i;
  731|  2.64k|    int gt, lt;
  732|  2.64k|    BN_ULONG t1, t2;
  ------------------
  |  |   37|  2.64k|#  define BN_ULONG        unsigned long
  ------------------
  733|       |
  734|  2.64k|    if ((a == NULL) || (b == NULL)) {
  ------------------
  |  Branch (734:9): [True: 0, False: 2.64k]
  |  Branch (734:24): [True: 0, False: 2.64k]
  ------------------
  735|      0|        if (a != NULL)
  ------------------
  |  Branch (735:13): [True: 0, False: 0]
  ------------------
  736|      0|            return -1;
  737|      0|        else if (b != NULL)
  ------------------
  |  Branch (737:18): [True: 0, False: 0]
  ------------------
  738|      0|            return 1;
  739|      0|        else
  740|      0|            return 0;
  741|      0|    }
  742|       |
  743|  2.64k|    bn_check_top(a);
  744|  2.64k|    bn_check_top(b);
  745|       |
  746|  2.64k|    if (a->neg != b->neg) {
  ------------------
  |  Branch (746:9): [True: 0, False: 2.64k]
  ------------------
  747|      0|        if (a->neg)
  ------------------
  |  Branch (747:13): [True: 0, False: 0]
  ------------------
  748|      0|            return -1;
  749|      0|        else
  750|      0|            return 1;
  751|      0|    }
  752|  2.64k|    if (a->neg == 0) {
  ------------------
  |  Branch (752:9): [True: 1.01k, False: 1.63k]
  ------------------
  753|  1.01k|        gt = 1;
  754|  1.01k|        lt = -1;
  755|  1.63k|    } else {
  756|  1.63k|        gt = -1;
  757|  1.63k|        lt = 1;
  758|  1.63k|    }
  759|       |
  760|  2.64k|    if (a->top > b->top)
  ------------------
  |  Branch (760:9): [True: 0, False: 2.64k]
  ------------------
  761|      0|        return gt;
  762|  2.64k|    if (a->top < b->top)
  ------------------
  |  Branch (762:9): [True: 0, False: 2.64k]
  ------------------
  763|      0|        return lt;
  764|  1.58M|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (764:26): [True: 1.58M, False: 2.64k]
  ------------------
  765|  1.58M|        t1 = a->d[i];
  766|  1.58M|        t2 = b->d[i];
  767|  1.58M|        if (t1 > t2)
  ------------------
  |  Branch (767:13): [True: 0, False: 1.58M]
  ------------------
  768|      0|            return gt;
  769|  1.58M|        if (t1 < t2)
  ------------------
  |  Branch (769:13): [True: 0, False: 1.58M]
  ------------------
  770|      0|            return lt;
  771|  1.58M|    }
  772|  2.64k|    return 0;
  773|  2.64k|}
BN_set_negative:
  853|  5.34k|{
  854|  5.34k|    if (b && !BN_is_zero(a))
  ------------------
  |  Branch (854:9): [True: 3.37k, False: 1.96k]
  |  Branch (854:14): [True: 3.25k, False: 123]
  ------------------
  855|  3.25k|        a->neg = 1;
  856|  2.08k|    else
  857|  2.08k|        a->neg = 0;
  858|  5.34k|}
bn_cmp_words:
  861|  2.84M|{
  862|  2.84M|    int i;
  863|  2.84M|    BN_ULONG aa, bb;
  ------------------
  |  |   37|  2.84M|#  define BN_ULONG        unsigned long
  ------------------
  864|       |
  865|  2.84M|    if (n == 0)
  ------------------
  |  Branch (865:9): [True: 0, False: 2.84M]
  ------------------
  866|      0|        return 0;
  867|       |
  868|  2.84M|    aa = a[n - 1];
  869|  2.84M|    bb = b[n - 1];
  870|  2.84M|    if (aa != bb)
  ------------------
  |  Branch (870:9): [True: 2.39M, False: 453k]
  ------------------
  871|  2.39M|        return ((aa > bb) ? 1 : -1);
  ------------------
  |  Branch (871:17): [True: 1.25M, False: 1.13M]
  ------------------
  872|  3.90M|    for (i = n - 2; i >= 0; i--) {
  ------------------
  |  Branch (872:21): [True: 3.72M, False: 176k]
  ------------------
  873|  3.72M|        aa = a[i];
  874|  3.72M|        bb = b[i];
  875|  3.72M|        if (aa != bb)
  ------------------
  |  Branch (875:13): [True: 276k, False: 3.44M]
  ------------------
  876|   276k|            return ((aa > bb) ? 1 : -1);
  ------------------
  |  Branch (876:21): [True: 130k, False: 146k]
  ------------------
  877|  3.72M|    }
  878|   176k|    return 0;
  879|   453k|}
bn_cmp_part_words:
  891|  2.84M|{
  892|  2.84M|    int n, i;
  893|  2.84M|    n = cl - 1;
  894|       |
  895|  2.84M|    if (dl < 0) {
  ------------------
  |  Branch (895:9): [True: 1.75k, False: 2.84M]
  ------------------
  896|  35.6k|        for (i = dl; i < 0; i++) {
  ------------------
  |  Branch (896:22): [True: 35.3k, False: 370]
  ------------------
  897|  35.3k|            if (b[n - i] != 0)
  ------------------
  |  Branch (897:17): [True: 1.38k, False: 33.9k]
  ------------------
  898|  1.38k|                return -1;      /* a < b */
  899|  35.3k|        }
  900|  1.75k|    }
  901|  2.84M|    if (dl > 0) {
  ------------------
  |  Branch (901:9): [True: 1.65k, False: 2.84M]
  ------------------
  902|  9.59k|        for (i = dl; i > 0; i--) {
  ------------------
  |  Branch (902:22): [True: 9.36k, False: 228]
  ------------------
  903|  9.36k|            if (a[n + i] != 0)
  ------------------
  |  Branch (903:17): [True: 1.43k, False: 7.93k]
  ------------------
  904|  1.43k|                return 1;       /* a > b */
  905|  9.36k|        }
  906|  1.65k|    }
  907|  2.84M|    return bn_cmp_words(a, b, cl);
  908|  2.84M|}
BN_zero_ex:
  999|  9.50k|{
 1000|  9.50k|    a->neg = 0;
 1001|  9.50k|    a->top = 0;
 1002|  9.50k|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  226|  9.50k|#  define BN_FLG_FIXED_TOP 0
  ------------------
 1003|  9.50k|}
BN_is_zero:
 1011|  12.2k|{
 1012|  12.2k|    return a->top == 0;
 1013|  12.2k|}
BN_is_negative:
 1031|  9.33k|{
 1032|  9.33k|    return (a->neg != 0);
 1033|  9.33k|}
BN_get_flags:
 1075|  4.65k|{
 1076|  4.65k|    return b->flags & n;
 1077|  4.65k|}
bn_wexpand:
 1105|  24.5k|{
 1106|  24.5k|    return (words <= a->dmax) ? a : bn_expand2(a, words);
  ------------------
  |  Branch (1106:12): [True: 23.8k, False: 672]
  ------------------
 1107|  24.5k|}
bn_correct_top:
 1132|  12.9k|{
 1133|  12.9k|    BN_ULONG *ftl;
  ------------------
  |  |   37|  12.9k|#  define BN_ULONG        unsigned long
  ------------------
 1134|  12.9k|    int tmp_top = a->top;
 1135|       |
 1136|  12.9k|    if (tmp_top > 0) {
  ------------------
  |  Branch (1136:9): [True: 12.4k, False: 495]
  ------------------
 1137|   374k|        for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
  ------------------
  |  Branch (1137:38): [True: 373k, False: 1.16k]
  ------------------
 1138|   373k|            ftl--;
 1139|   373k|            if (*ftl != 0)
  ------------------
  |  Branch (1139:17): [True: 11.2k, False: 362k]
  ------------------
 1140|  11.2k|                break;
 1141|   373k|        }
 1142|  12.4k|        a->top = tmp_top;
 1143|  12.4k|    }
 1144|  12.9k|    if (a->top == 0)
  ------------------
  |  Branch (1144:9): [True: 1.66k, False: 11.2k]
  ------------------
 1145|  1.66k|        a->neg = 0;
 1146|  12.9k|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  226|  12.9k|#  define BN_FLG_FIXED_TOP 0
  ------------------
 1147|  12.9k|    bn_pollute(a);
 1148|  12.9k|}
bn_lib.c:bn_free_d:
  203|    664|{
  204|    664|    if (BN_get_flags(a, BN_FLG_SECURE))
  ------------------
  |  |   68|    664|# define BN_FLG_SECURE           0x08
  ------------------
  |  Branch (204:9): [True: 0, False: 664]
  ------------------
  205|      0|        OPENSSL_secure_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  121|      0|        CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  206|    664|    else if (clear != 0)
  ------------------
  |  Branch (206:14): [True: 664, False: 0]
  ------------------
  207|    664|        OPENSSL_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  105|    664|        CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|    664|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|    664|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  208|      0|    else
  209|      0|        OPENSSL_free(a->d);
  ------------------
  |  |  107|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  210|    664|}
bn_lib.c:bn_expand_internal:
  265|    672|{
  266|    672|    BN_ULONG *a = NULL;
  ------------------
  |  |   37|    672|#  define BN_ULONG        unsigned long
  ------------------
  267|       |
  268|    672|    if (words > (INT_MAX / (4 * BN_BITS2))) {
  ------------------
  |  |   54|    672|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|    672|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  |  Branch (268:9): [True: 0, False: 672]
  ------------------
  269|      0|        ERR_raise(ERR_LIB_BN, BN_R_BIGNUM_TOO_LONG);
  ------------------
  |  |  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),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  300|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  270|      0|        return NULL;
  271|      0|    }
  272|    672|    if (BN_get_flags(b, BN_FLG_STATIC_DATA)) {
  ------------------
  |  |   59|    672|# define BN_FLG_STATIC_DATA      0x02
  ------------------
  |  Branch (272:9): [True: 0, False: 672]
  ------------------
  273|      0|        ERR_raise(ERR_LIB_BN, BN_R_EXPAND_ON_STATIC_BIGNUM_DATA);
  ------------------
  |  |  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),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  300|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  274|      0|        return NULL;
  275|      0|    }
  276|    672|    if (BN_get_flags(b, BN_FLG_SECURE))
  ------------------
  |  |   68|    672|# define BN_FLG_SECURE           0x08
  ------------------
  |  Branch (276:9): [True: 0, False: 672]
  ------------------
  277|      0|        a = OPENSSL_secure_zalloc(words * sizeof(*a));
  ------------------
  |  |  117|      0|        CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  278|    672|    else
  279|    672|        a = OPENSSL_zalloc(words * sizeof(*a));
  ------------------
  |  |   99|    672|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|    672|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|    672|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  280|    672|    if (a == NULL)
  ------------------
  |  Branch (280:9): [True: 0, False: 672]
  ------------------
  281|      0|        return NULL;
  282|       |
  283|    672|    assert(b->top <= words);
  284|    672|    if (b->top > 0)
  ------------------
  |  Branch (284:9): [True: 416, False: 256]
  ------------------
  285|    416|        memcpy(a, b->d, sizeof(*a) * b->top);
  286|       |
  287|    672|    return a;
  288|    672|}
bn_lib.c:bin2bn:
  434|  5.34k|{
  435|  5.34k|    int inc;
  436|  5.34k|    const unsigned char *s2;
  437|  5.34k|    int inc2;
  438|  5.34k|    int neg = 0, xor = 0, carry = 0;
  439|  5.34k|    unsigned int i;
  440|  5.34k|    unsigned int n;
  441|  5.34k|    BIGNUM *bn = NULL;
  442|       |
  443|       |    /* Negative length is not acceptable */
  444|  5.34k|    if (len < 0)
  ------------------
  |  Branch (444:9): [True: 0, False: 5.34k]
  ------------------
  445|      0|        return NULL;
  446|       |
  447|  5.34k|    if (ret == NULL)
  ------------------
  |  Branch (447:9): [True: 0, False: 5.34k]
  ------------------
  448|      0|        ret = bn = BN_new();
  449|  5.34k|    if (ret == NULL)
  ------------------
  |  Branch (449:9): [True: 0, False: 5.34k]
  ------------------
  450|      0|        return NULL;
  451|  5.34k|    bn_check_top(ret);
  452|       |
  453|       |    /*
  454|       |     * If the input has no bits, the number is considered zero.
  455|       |     * This makes calls with s==NULL and len==0 safe.
  456|       |     */
  457|  5.34k|    if (len == 0) {
  ------------------
  |  Branch (457:9): [True: 335, False: 5.00k]
  ------------------
  458|    335|        BN_clear(ret);
  459|    335|        return ret;
  460|    335|    }
  461|       |
  462|       |    /*
  463|       |     * The loop that does the work iterates from least to most
  464|       |     * significant BIGNUM chunk, so we adapt parameters to transfer
  465|       |     * input bytes accordingly.
  466|       |     */
  467|  5.00k|    if (endianness == LITTLE) {
  ------------------
  |  Branch (467:9): [True: 0, False: 5.00k]
  ------------------
  468|      0|        s2 = s + len - 1;
  469|      0|        inc2 = -1;
  470|      0|        inc = 1;
  471|  5.00k|    } else {
  472|  5.00k|        s2 = s;
  473|  5.00k|        inc2 = 1;
  474|  5.00k|        inc = -1;
  475|  5.00k|        s += len - 1;
  476|  5.00k|    }
  477|       |
  478|       |    /* Take note of the signedness of the input bytes*/
  479|  5.00k|    if (signedness == SIGNED) {
  ------------------
  |  Branch (479:9): [True: 0, False: 5.00k]
  ------------------
  480|      0|        neg = !!(*s2 & 0x80);
  481|      0|        xor = neg ? 0xff : 0x00;
  ------------------
  |  Branch (481:15): [True: 0, False: 0]
  ------------------
  482|      0|        carry = neg;
  483|      0|    }
  484|       |
  485|       |    /*
  486|       |     * Skip leading sign extensions (the value of |xor|).
  487|       |     * This is the only spot where |s2| and |inc2| are used.
  488|       |     */
  489|  81.6k|    for ( ; len > 0 && *s2 == xor; s2 += inc2, len--)
  ------------------
  |  Branch (489:13): [True: 81.6k, False: 14]
  |  Branch (489:24): [True: 76.6k, False: 4.99k]
  ------------------
  490|  76.6k|        continue;
  491|       |
  492|       |    /*
  493|       |     * If there was a set of 0xff, we backtrack one byte unless the next
  494|       |     * one has a sign bit, as the last 0xff is then part of the actual
  495|       |     * number, rather then a mere sign extension.
  496|       |     */
  497|  5.00k|    if (xor == 0xff) {
  ------------------
  |  Branch (497:9): [True: 0, False: 5.00k]
  ------------------
  498|      0|        if (len == 0 || !(*s2 & 0x80))
  ------------------
  |  Branch (498:13): [True: 0, False: 0]
  |  Branch (498:25): [True: 0, False: 0]
  ------------------
  499|      0|            len++;
  500|      0|    }
  501|       |    /* If it was all zeros, we're done */
  502|  5.00k|    if (len == 0) {
  ------------------
  |  Branch (502:9): [True: 14, False: 4.99k]
  ------------------
  503|     14|        ret->top = 0;
  504|     14|        return ret;
  505|     14|    }
  506|  4.99k|    n = ((len - 1) / BN_BYTES) + 1; /* Number of resulting bignum chunks */
  ------------------
  |  |   38|  4.99k|#  define BN_BYTES        8
  ------------------
  507|  4.99k|    if (bn_wexpand(ret, (int)n) == NULL) {
  ------------------
  |  Branch (507:9): [True: 0, False: 4.99k]
  ------------------
  508|      0|        BN_free(bn);
  509|      0|        return NULL;
  510|      0|    }
  511|  4.99k|    ret->top = n;
  512|  4.99k|    ret->neg = neg;
  513|  2.59M|    for (i = 0; n-- > 0; i++) {
  ------------------
  |  Branch (513:17): [True: 2.59M, False: 4.99k]
  ------------------
  514|  2.59M|        BN_ULONG l = 0;        /* Accumulator */
  ------------------
  |  |   37|  2.59M|#  define BN_ULONG        unsigned long
  ------------------
  515|  2.59M|        unsigned int m = 0;    /* Offset in a bignum chunk, in bits */
  516|       |
  517|  23.3M|        for (; len > 0 && m < BN_BYTES * 8; len--, s += inc, m += 8) {
  ------------------
  |  |   38|  23.3M|#  define BN_BYTES        8
  ------------------
  |  Branch (517:16): [True: 23.3M, False: 4.99k]
  |  Branch (517:27): [True: 20.7M, False: 2.58M]
  ------------------
  518|  20.7M|            BN_ULONG byte_xored = *s ^ xor;
  ------------------
  |  |   37|  20.7M|#  define BN_ULONG        unsigned long
  ------------------
  519|  20.7M|            BN_ULONG byte = (byte_xored + carry) & 0xff;
  ------------------
  |  |   37|  20.7M|#  define BN_ULONG        unsigned long
  ------------------
  520|       |
  521|  20.7M|            carry = byte_xored > byte; /* Implicit 1 or 0 */
  522|  20.7M|            l |= (byte << m);
  523|  20.7M|        }
  524|  2.59M|        ret->d[i] = l;
  525|  2.59M|    }
  526|       |    /*
  527|       |     * need to call this due to clear byte at top if avoiding having the top
  528|       |     * bit set (-ve number)
  529|       |     */
  530|  4.99k|    bn_correct_top(ret);
  531|  4.99k|    return ret;
  532|  4.99k|}

bn_sub_part_words:
   30|  2.51M|{
   31|  2.51M|    BN_ULONG c, t;
  ------------------
  |  |   37|  2.51M|#  define BN_ULONG        unsigned long
  ------------------
   32|       |
   33|  2.51M|    assert(cl >= 0);
   34|  2.51M|    c = bn_sub_words(r, a, b, cl);
   35|       |
   36|  2.51M|    if (dl == 0)
  ------------------
  |  Branch (36:9): [True: 2.50M, False: 3.37k]
  ------------------
   37|  2.50M|        return c;
   38|       |
   39|  3.37k|    r += cl;
   40|  3.37k|    a += cl;
   41|  3.37k|    b += cl;
   42|       |
   43|  3.37k|    if (dl < 0) {
  ------------------
  |  Branch (43:9): [True: 433, False: 2.93k]
  ------------------
   44|  9.91k|        for (;;) {
   45|  9.91k|            t = b[0];
   46|  9.91k|            r[0] = (0 - t - c) & BN_MASK2;
  ------------------
  |  |   94|  9.91k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   47|  9.91k|            if (t != 0)
  ------------------
  |  Branch (47:17): [True: 0, False: 9.91k]
  ------------------
   48|      0|                c = 1;
   49|  9.91k|            if (++dl >= 0)
  ------------------
  |  Branch (49:17): [True: 121, False: 9.79k]
  ------------------
   50|    121|                break;
   51|       |
   52|  9.79k|            t = b[1];
   53|  9.79k|            r[1] = (0 - t - c) & BN_MASK2;
  ------------------
  |  |   94|  9.79k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   54|  9.79k|            if (t != 0)
  ------------------
  |  Branch (54:17): [True: 0, False: 9.79k]
  ------------------
   55|      0|                c = 1;
   56|  9.79k|            if (++dl >= 0)
  ------------------
  |  Branch (56:17): [True: 84, False: 9.70k]
  ------------------
   57|     84|                break;
   58|       |
   59|  9.70k|            t = b[2];
   60|  9.70k|            r[2] = (0 - t - c) & BN_MASK2;
  ------------------
  |  |   94|  9.70k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   61|  9.70k|            if (t != 0)
  ------------------
  |  Branch (61:17): [True: 0, False: 9.70k]
  ------------------
   62|      0|                c = 1;
   63|  9.70k|            if (++dl >= 0)
  ------------------
  |  Branch (63:17): [True: 168, False: 9.53k]
  ------------------
   64|    168|                break;
   65|       |
   66|  9.53k|            t = b[3];
   67|  9.53k|            r[3] = (0 - t - c) & BN_MASK2;
  ------------------
  |  |   94|  9.53k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   68|  9.53k|            if (t != 0)
  ------------------
  |  Branch (68:17): [True: 0, False: 9.53k]
  ------------------
   69|      0|                c = 1;
   70|  9.53k|            if (++dl >= 0)
  ------------------
  |  Branch (70:17): [True: 60, False: 9.47k]
  ------------------
   71|     60|                break;
   72|       |
   73|  9.47k|            b += 4;
   74|  9.47k|            r += 4;
   75|  9.47k|        }
   76|  2.93k|    } else {
   77|  2.93k|        int save_dl = dl;
   78|  4.43k|        while (c) {
  ------------------
  |  Branch (78:16): [True: 1.79k, False: 2.64k]
  ------------------
   79|  1.79k|            t = a[0];
   80|  1.79k|            r[0] = (t - c) & BN_MASK2;
  ------------------
  |  |   94|  1.79k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   81|  1.79k|            if (t != 0)
  ------------------
  |  Branch (81:17): [True: 549, False: 1.24k]
  ------------------
   82|    549|                c = 0;
   83|  1.79k|            if (--dl <= 0)
  ------------------
  |  Branch (83:17): [True: 67, False: 1.72k]
  ------------------
   84|     67|                break;
   85|       |
   86|  1.72k|            t = a[1];
   87|  1.72k|            r[1] = (t - c) & BN_MASK2;
  ------------------
  |  |   94|  1.72k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   88|  1.72k|            if (t != 0)
  ------------------
  |  Branch (88:17): [True: 495, False: 1.23k]
  ------------------
   89|    495|                c = 0;
   90|  1.72k|            if (--dl <= 0)
  ------------------
  |  Branch (90:17): [True: 73, False: 1.65k]
  ------------------
   91|     73|                break;
   92|       |
   93|  1.65k|            t = a[2];
   94|  1.65k|            r[2] = (t - c) & BN_MASK2;
  ------------------
  |  |   94|  1.65k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   95|  1.65k|            if (t != 0)
  ------------------
  |  Branch (95:17): [True: 491, False: 1.16k]
  ------------------
   96|    491|                c = 0;
   97|  1.65k|            if (--dl <= 0)
  ------------------
  |  Branch (97:17): [True: 111, False: 1.54k]
  ------------------
   98|    111|                break;
   99|       |
  100|  1.54k|            t = a[3];
  101|  1.54k|            r[3] = (t - c) & BN_MASK2;
  ------------------
  |  |   94|  1.54k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  102|  1.54k|            if (t != 0)
  ------------------
  |  Branch (102:17): [True: 412, False: 1.13k]
  ------------------
  103|    412|                c = 0;
  104|  1.54k|            if (--dl <= 0)
  ------------------
  |  Branch (104:17): [True: 45, False: 1.49k]
  ------------------
  105|     45|                break;
  106|       |
  107|  1.49k|            save_dl = dl;
  108|  1.49k|            a += 4;
  109|  1.49k|            r += 4;
  110|  1.49k|        }
  111|  2.93k|        if (dl > 0) {
  ------------------
  |  Branch (111:13): [True: 2.64k, False: 296]
  ------------------
  112|  2.64k|            if (save_dl > dl) {
  ------------------
  |  Branch (112:17): [True: 0, False: 2.64k]
  ------------------
  113|      0|                switch (save_dl - dl) {
  ------------------
  |  Branch (113:25): [True: 0, False: 0]
  ------------------
  114|      0|                case 1:
  ------------------
  |  Branch (114:17): [True: 0, False: 0]
  ------------------
  115|      0|                    r[1] = a[1];
  116|      0|                    if (--dl <= 0)
  ------------------
  |  Branch (116:25): [True: 0, False: 0]
  ------------------
  117|      0|                        break;
  118|       |                    /* fall through */
  119|      0|                case 2:
  ------------------
  |  Branch (119:17): [True: 0, False: 0]
  ------------------
  120|      0|                    r[2] = a[2];
  121|      0|                    if (--dl <= 0)
  ------------------
  |  Branch (121:25): [True: 0, False: 0]
  ------------------
  122|      0|                        break;
  123|       |                    /* fall through */
  124|      0|                case 3:
  ------------------
  |  Branch (124:17): [True: 0, False: 0]
  ------------------
  125|      0|                    r[3] = a[3];
  126|      0|                    if (--dl <= 0)
  ------------------
  |  Branch (126:25): [True: 0, False: 0]
  ------------------
  127|      0|                        break;
  128|      0|                }
  129|      0|                a += 4;
  130|      0|                r += 4;
  131|      0|            }
  132|  2.64k|        }
  133|  2.93k|        if (dl > 0) {
  ------------------
  |  Branch (133:13): [True: 2.64k, False: 296]
  ------------------
  134|   106k|            for (;;) {
  135|   106k|                r[0] = a[0];
  136|   106k|                if (--dl <= 0)
  ------------------
  |  Branch (136:21): [True: 531, False: 105k]
  ------------------
  137|    531|                    break;
  138|   105k|                r[1] = a[1];
  139|   105k|                if (--dl <= 0)
  ------------------
  |  Branch (139:21): [True: 318, False: 105k]
  ------------------
  140|    318|                    break;
  141|   105k|                r[2] = a[2];
  142|   105k|                if (--dl <= 0)
  ------------------
  |  Branch (142:21): [True: 1.11k, False: 104k]
  ------------------
  143|  1.11k|                    break;
  144|   104k|                r[3] = a[3];
  145|   104k|                if (--dl <= 0)
  ------------------
  |  Branch (145:21): [True: 677, False: 103k]
  ------------------
  146|    677|                    break;
  147|       |
  148|   103k|                a += 4;
  149|   103k|                r += 4;
  150|   103k|            }
  151|  2.64k|        }
  152|  2.93k|    }
  153|  3.37k|    return c;
  154|  3.37k|}
bn_mul_recursive:
  177|  1.42M|{
  178|  1.42M|    int n = n2 / 2, c1, c2;
  179|  1.42M|    int tna = n + dna, tnb = n + dnb;
  180|  1.42M|    unsigned int neg, zero;
  181|  1.42M|    BN_ULONG ln, lo, *p;
  ------------------
  |  |   37|  1.42M|#  define BN_ULONG        unsigned long
  ------------------
  182|       |
  183|  1.42M|# ifdef BN_MUL_COMBA
  184|       |#  if 0
  185|       |    if (n2 == 4) {
  186|       |        bn_mul_comba4(r, a, b);
  187|       |        return;
  188|       |    }
  189|       |#  endif
  190|       |    /*
  191|       |     * Only call bn_mul_comba 8 if n2 == 8 and the two arrays are complete
  192|       |     * [steve]
  193|       |     */
  194|  1.42M|    if (n2 == 8 && dna == 0 && dnb == 0) {
  ------------------
  |  Branch (194:9): [True: 169, False: 1.42M]
  |  Branch (194:20): [True: 157, False: 12]
  |  Branch (194:32): [True: 105, False: 52]
  ------------------
  195|    105|        bn_mul_comba8(r, a, b);
  196|    105|        return;
  197|    105|    }
  198|  1.42M|# endif                         /* BN_MUL_COMBA */
  199|       |    /* Else do normal multiply */
  200|  1.42M|    if (n2 < BN_MUL_RECURSIVE_SIZE_NORMAL) {
  ------------------
  |  |  365|  1.42M|# define BN_MUL_RECURSIVE_SIZE_NORMAL            (16)/* 32 less than */
  ------------------
  |  Branch (200:9): [True: 64, False: 1.42M]
  ------------------
  201|     64|        bn_mul_normal(r, a, n2 + dna, b, n2 + dnb);
  202|     64|        if ((dna + dnb) < 0)
  ------------------
  |  Branch (202:13): [True: 64, False: 0]
  ------------------
  203|     64|            memset(&r[2 * n2 + dna + dnb], 0,
  204|     64|                   sizeof(BN_ULONG) * -(dna + dnb));
  205|     64|        return;
  206|     64|    }
  207|       |    /* r=(a[0]-a[1])*(b[1]-b[0]) */
  208|  1.42M|    c1 = bn_cmp_part_words(a, &(a[n]), tna, n - tna);
  209|  1.42M|    c2 = bn_cmp_part_words(&(b[n]), b, tnb, tnb - n);
  210|  1.42M|    zero = neg = 0;
  211|  1.42M|    switch (c1 * 3 + c2) {
  ------------------
  |  Branch (211:13): [True: 0, False: 1.42M]
  ------------------
  212|   280k|    case -4:
  ------------------
  |  Branch (212:5): [True: 280k, False: 1.14M]
  ------------------
  213|   280k|        bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */
  214|   280k|        bn_sub_part_words(&(t[n]), b, &(b[n]), tnb, n - tnb); /* - */
  215|   280k|        break;
  216|  74.3k|    case -3:
  ------------------
  |  Branch (216:5): [True: 74.3k, False: 1.34M]
  ------------------
  217|  74.3k|        zero = 1;
  218|  74.3k|        break;
  219|   239k|    case -2:
  ------------------
  |  Branch (219:5): [True: 239k, False: 1.18M]
  ------------------
  220|   239k|        bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */
  221|   239k|        bn_sub_part_words(&(t[n]), &(b[n]), b, tnb, tnb - n); /* + */
  222|   239k|        neg = 1;
  223|   239k|        break;
  224|    361|    case -1:
  ------------------
  |  Branch (224:5): [True: 361, False: 1.42M]
  ------------------
  225|  10.4k|    case 0:
  ------------------
  |  Branch (225:5): [True: 10.1k, False: 1.41M]
  ------------------
  226|  10.9k|    case 1:
  ------------------
  |  Branch (226:5): [True: 409, False: 1.42M]
  ------------------
  227|  10.9k|        zero = 1;
  228|  10.9k|        break;
  229|   406k|    case 2:
  ------------------
  |  Branch (229:5): [True: 406k, False: 1.01M]
  ------------------
  230|   406k|        bn_sub_part_words(t, a, &(a[n]), tna, n - tna); /* + */
  231|   406k|        bn_sub_part_words(&(t[n]), b, &(b[n]), tnb, n - tnb); /* - */
  232|   406k|        neg = 1;
  233|   406k|        break;
  234|  81.3k|    case 3:
  ------------------
  |  Branch (234:5): [True: 81.3k, False: 1.34M]
  ------------------
  235|  81.3k|        zero = 1;
  236|  81.3k|        break;
  237|   327k|    case 4:
  ------------------
  |  Branch (237:5): [True: 327k, False: 1.09M]
  ------------------
  238|   327k|        bn_sub_part_words(t, a, &(a[n]), tna, n - tna);
  239|   327k|        bn_sub_part_words(&(t[n]), &(b[n]), b, tnb, tnb - n);
  240|   327k|        break;
  241|  1.42M|    }
  242|       |
  243|  1.42M|# ifdef BN_MUL_COMBA
  244|  1.42M|    if (n == 4 && dna == 0 && dnb == 0) { /* XXX: bn_mul_comba4 could take
  ------------------
  |  Branch (244:9): [True: 0, False: 1.42M]
  |  Branch (244:19): [True: 0, False: 0]
  |  Branch (244:31): [True: 0, False: 0]
  ------------------
  245|       |                                           * extra args to do this well */
  246|      0|        if (!zero)
  ------------------
  |  Branch (246:13): [True: 0, False: 0]
  ------------------
  247|      0|            bn_mul_comba4(&(t[n2]), t, &(t[n]));
  248|      0|        else
  249|      0|            memset(&t[n2], 0, sizeof(*t) * 8);
  250|       |
  251|      0|        bn_mul_comba4(r, a, b);
  252|      0|        bn_mul_comba4(&(r[n2]), &(a[n]), &(b[n]));
  253|  1.42M|    } else if (n == 8 && dna == 0 && dnb == 0) { /* XXX: bn_mul_comba8 could
  ------------------
  |  Branch (253:16): [True: 932k, False: 488k]
  |  Branch (253:26): [True: 932k, False: 11]
  |  Branch (253:38): [True: 932k, False: 51]
  ------------------
  254|       |                                                  * take extra args to do
  255|       |                                                  * this well */
  256|   932k|        if (!zero)
  ------------------
  |  Branch (256:13): [True: 814k, False: 118k]
  ------------------
  257|   814k|            bn_mul_comba8(&(t[n2]), t, &(t[n]));
  258|   118k|        else
  259|   118k|            memset(&t[n2], 0, sizeof(*t) * 16);
  260|       |
  261|   932k|        bn_mul_comba8(r, a, b);
  262|   932k|        bn_mul_comba8(&(r[n2]), &(a[n]), &(b[n]));
  263|   932k|    } else
  264|   488k|# endif                         /* BN_MUL_COMBA */
  265|   488k|    {
  266|   488k|        p = &(t[n2 * 2]);
  267|   488k|        if (!zero)
  ------------------
  |  Branch (267:13): [True: 440k, False: 48.2k]
  ------------------
  268|   440k|            bn_mul_recursive(&(t[n2]), t, &(t[n]), n, 0, 0, p);
  269|  48.2k|        else
  270|  48.2k|            memset(&t[n2], 0, sizeof(*t) * n2);
  271|   488k|        bn_mul_recursive(r, a, b, n, 0, 0, p);
  272|   488k|        bn_mul_recursive(&(r[n2]), &(a[n]), &(b[n]), n, dna, dnb, p);
  273|   488k|    }
  274|       |
  275|       |    /*-
  276|       |     * t[32] holds (a[0]-a[1])*(b[1]-b[0]), c1 is the sign
  277|       |     * r[10] holds (a[0]*b[0])
  278|       |     * r[32] holds (b[1]*b[1])
  279|       |     */
  280|       |
  281|  1.42M|    c1 = (int)(bn_add_words(t, r, &(r[n2]), n2));
  282|       |
  283|  1.42M|    if (neg) {                  /* if t[32] is negative */
  ------------------
  |  Branch (283:9): [True: 646k, False: 774k]
  ------------------
  284|   646k|        c1 -= (int)(bn_sub_words(&(t[n2]), t, &(t[n2]), n2));
  285|   774k|    } else {
  286|       |        /* Might have a carry */
  287|   774k|        c1 += (int)(bn_add_words(&(t[n2]), &(t[n2]), t, n2));
  288|   774k|    }
  289|       |
  290|       |    /*-
  291|       |     * t[32] holds (a[0]-a[1])*(b[1]-b[0])+(a[0]*b[0])+(a[1]*b[1])
  292|       |     * r[10] holds (a[0]*b[0])
  293|       |     * r[32] holds (b[1]*b[1])
  294|       |     * c1 holds the carry bits
  295|       |     */
  296|  1.42M|    c1 += (int)(bn_add_words(&(r[n]), &(r[n]), &(t[n2]), n2));
  297|  1.42M|    if (c1) {
  ------------------
  |  Branch (297:9): [True: 513k, False: 907k]
  ------------------
  298|   513k|        p = &(r[n + n2]);
  299|   513k|        lo = *p;
  300|   513k|        ln = (lo + c1) & BN_MASK2;
  ------------------
  |  |   94|   513k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  301|   513k|        *p = ln;
  302|       |
  303|       |        /*
  304|       |         * The overflow will stop before we over write words we should not
  305|       |         * overwrite
  306|       |         */
  307|   513k|        if (ln < (BN_ULONG)c1) {
  ------------------
  |  Branch (307:13): [True: 1.08k, False: 512k]
  ------------------
  308|  6.42k|            do {
  309|  6.42k|                p++;
  310|  6.42k|                lo = *p;
  311|  6.42k|                ln = (lo + 1) & BN_MASK2;
  ------------------
  |  |   94|  6.42k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  312|  6.42k|                *p = ln;
  313|  6.42k|            } while (ln == 0);
  ------------------
  |  Branch (313:22): [True: 5.33k, False: 1.08k]
  ------------------
  314|  1.08k|        }
  315|   513k|    }
  316|  1.42M|}
bn_mul_part_recursive:
  324|  1.60k|{
  325|  1.60k|    int i, j, n2 = n * 2;
  326|  1.60k|    int c1, c2, neg;
  327|  1.60k|    BN_ULONG ln, lo, *p;
  ------------------
  |  |   37|  1.60k|#  define BN_ULONG        unsigned long
  ------------------
  328|       |
  329|  1.60k|    if (n < 8) {
  ------------------
  |  Branch (329:9): [True: 0, False: 1.60k]
  ------------------
  330|      0|        bn_mul_normal(r, a, n + tna, b, n + tnb);
  331|      0|        return;
  332|      0|    }
  333|       |
  334|       |    /* r=(a[0]-a[1])*(b[1]-b[0]) */
  335|  1.60k|    c1 = bn_cmp_part_words(a, &(a[n]), tna, n - tna);
  336|  1.60k|    c2 = bn_cmp_part_words(&(b[n]), b, tnb, tnb - n);
  337|  1.60k|    neg = 0;
  338|  1.60k|    switch (c1 * 3 + c2) {
  ------------------
  |  Branch (338:13): [True: 0, False: 1.60k]
  ------------------
  339|     62|    case -4:
  ------------------
  |  Branch (339:5): [True: 62, False: 1.54k]
  ------------------
  340|     62|        bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */
  341|     62|        bn_sub_part_words(&(t[n]), b, &(b[n]), tnb, n - tnb); /* - */
  342|     62|        break;
  343|     19|    case -3:
  ------------------
  |  Branch (343:5): [True: 19, False: 1.58k]
  ------------------
  344|    100|    case -2:
  ------------------
  |  Branch (344:5): [True: 81, False: 1.52k]
  ------------------
  345|    100|        bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */
  346|    100|        bn_sub_part_words(&(t[n]), &(b[n]), b, tnb, tnb - n); /* + */
  347|    100|        neg = 1;
  348|    100|        break;
  349|     15|    case -1:
  ------------------
  |  Branch (349:5): [True: 15, False: 1.58k]
  ------------------
  350|     27|    case 0:
  ------------------
  |  Branch (350:5): [True: 12, False: 1.59k]
  ------------------
  351|     49|    case 1:
  ------------------
  |  Branch (351:5): [True: 22, False: 1.58k]
  ------------------
  352|  1.31k|    case 2:
  ------------------
  |  Branch (352:5): [True: 1.26k, False: 336]
  ------------------
  353|  1.31k|        bn_sub_part_words(t, a, &(a[n]), tna, n - tna); /* + */
  354|  1.31k|        bn_sub_part_words(&(t[n]), b, &(b[n]), tnb, n - tnb); /* - */
  355|  1.31k|        neg = 1;
  356|  1.31k|        break;
  357|     22|    case 3:
  ------------------
  |  Branch (357:5): [True: 22, False: 1.58k]
  ------------------
  358|    125|    case 4:
  ------------------
  |  Branch (358:5): [True: 103, False: 1.49k]
  ------------------
  359|    125|        bn_sub_part_words(t, a, &(a[n]), tna, n - tna);
  360|    125|        bn_sub_part_words(&(t[n]), &(b[n]), b, tnb, tnb - n);
  361|    125|        break;
  362|  1.60k|    }
  363|       |    /*
  364|       |     * The zero case isn't yet implemented here. The speedup would probably
  365|       |     * be negligible.
  366|       |     */
  367|       |# if 0
  368|       |    if (n == 4) {
  369|       |        bn_mul_comba4(&(t[n2]), t, &(t[n]));
  370|       |        bn_mul_comba4(r, a, b);
  371|       |        bn_mul_normal(&(r[n2]), &(a[n]), tn, &(b[n]), tn);
  372|       |        memset(&r[n2 + tn * 2], 0, sizeof(*r) * (n2 - tn * 2));
  373|       |    } else
  374|       |# endif
  375|  1.60k|    if (n == 8) {
  ------------------
  |  Branch (375:9): [True: 267, False: 1.33k]
  ------------------
  376|    267|        bn_mul_comba8(&(t[n2]), t, &(t[n]));
  377|    267|        bn_mul_comba8(r, a, b);
  378|    267|        bn_mul_normal(&(r[n2]), &(a[n]), tna, &(b[n]), tnb);
  379|    267|        memset(&r[n2 + tna + tnb], 0, sizeof(*r) * (n2 - tna - tnb));
  380|  1.33k|    } else {
  381|  1.33k|        p = &(t[n2 * 2]);
  382|  1.33k|        bn_mul_recursive(&(t[n2]), t, &(t[n]), n, 0, 0, p);
  383|  1.33k|        bn_mul_recursive(r, a, b, n, 0, 0, p);
  384|  1.33k|        i = n / 2;
  385|       |        /*
  386|       |         * If there is only a bottom half to the number, just do it
  387|       |         */
  388|  1.33k|        if (tna > tnb)
  ------------------
  |  Branch (388:13): [True: 697, False: 638]
  ------------------
  389|    697|            j = tna - i;
  390|    638|        else
  391|    638|            j = tnb - i;
  392|  1.33k|        if (j == 0) {
  ------------------
  |  Branch (392:13): [True: 13, False: 1.32k]
  ------------------
  393|     13|            bn_mul_recursive(&(r[n2]), &(a[n]), &(b[n]),
  394|     13|                             i, tna - i, tnb - i, p);
  395|     13|            memset(&r[n2 + i * 2], 0, sizeof(*r) * (n2 - i * 2));
  396|  1.32k|        } else if (j > 0) {     /* eg, n == 16, i == 8 and tn == 11 */
  ------------------
  |  Branch (396:20): [True: 706, False: 616]
  ------------------
  397|    706|            bn_mul_part_recursive(&(r[n2]), &(a[n]), &(b[n]),
  398|    706|                                  i, tna - i, tnb - i, p);
  399|    706|            memset(&(r[n2 + tna + tnb]), 0,
  400|    706|                   sizeof(BN_ULONG) * (n2 - tna - tnb));
  401|    706|        } else {                /* (j < 0) eg, n == 16, i == 8 and tn == 5 */
  402|       |
  403|    616|            memset(&r[n2], 0, sizeof(*r) * n2);
  404|    616|            if (tna < BN_MUL_RECURSIVE_SIZE_NORMAL
  ------------------
  |  |  365|  1.23k|# define BN_MUL_RECURSIVE_SIZE_NORMAL            (16)/* 32 less than */
  ------------------
  |  Branch (404:17): [True: 537, False: 79]
  ------------------
  405|    616|                && tnb < BN_MUL_RECURSIVE_SIZE_NORMAL) {
  ------------------
  |  |  365|    537|# define BN_MUL_RECURSIVE_SIZE_NORMAL            (16)/* 32 less than */
  ------------------
  |  Branch (405:20): [True: 535, False: 2]
  ------------------
  406|    535|                bn_mul_normal(&(r[n2]), &(a[n]), tna, &(b[n]), tnb);
  407|    535|            } else {
  408|    142|                for (;;) {
  409|    142|                    i /= 2;
  410|       |                    /*
  411|       |                     * these simplified conditions work exclusively because
  412|       |                     * difference between tna and tnb is 1 or 0
  413|       |                     */
  414|    142|                    if (i < tna || i < tnb) {
  ------------------
  |  Branch (414:25): [True: 64, False: 78]
  |  Branch (414:36): [True: 2, False: 76]
  ------------------
  415|     66|                        bn_mul_part_recursive(&(r[n2]),
  416|     66|                                              &(a[n]), &(b[n]),
  417|     66|                                              i, tna - i, tnb - i, p);
  418|     66|                        break;
  419|     76|                    } else if (i == tna || i == tnb) {
  ------------------
  |  Branch (419:32): [True: 13, False: 63]
  |  Branch (419:44): [True: 2, False: 61]
  ------------------
  420|     15|                        bn_mul_recursive(&(r[n2]),
  421|     15|                                         &(a[n]), &(b[n]),
  422|     15|                                         i, tna - i, tnb - i, p);
  423|     15|                        break;
  424|     15|                    }
  425|    142|                }
  426|     81|            }
  427|    616|        }
  428|  1.33k|    }
  429|       |
  430|       |    /*-
  431|       |     * t[32] holds (a[0]-a[1])*(b[1]-b[0]), c1 is the sign
  432|       |     * r[10] holds (a[0]*b[0])
  433|       |     * r[32] holds (b[1]*b[1])
  434|       |     */
  435|       |
  436|  1.60k|    c1 = (int)(bn_add_words(t, r, &(r[n2]), n2));
  437|       |
  438|  1.60k|    if (neg) {                  /* if t[32] is negative */
  ------------------
  |  Branch (438:9): [True: 1.41k, False: 187]
  ------------------
  439|  1.41k|        c1 -= (int)(bn_sub_words(&(t[n2]), t, &(t[n2]), n2));
  440|  1.41k|    } else {
  441|       |        /* Might have a carry */
  442|    187|        c1 += (int)(bn_add_words(&(t[n2]), &(t[n2]), t, n2));
  443|    187|    }
  444|       |
  445|       |    /*-
  446|       |     * t[32] holds (a[0]-a[1])*(b[1]-b[0])+(a[0]*b[0])+(a[1]*b[1])
  447|       |     * r[10] holds (a[0]*b[0])
  448|       |     * r[32] holds (b[1]*b[1])
  449|       |     * c1 holds the carry bits
  450|       |     */
  451|  1.60k|    c1 += (int)(bn_add_words(&(r[n]), &(r[n]), &(t[n2]), n2));
  452|  1.60k|    if (c1) {
  ------------------
  |  Branch (452:9): [True: 230, False: 1.37k]
  ------------------
  453|    230|        p = &(r[n + n2]);
  454|    230|        lo = *p;
  455|    230|        ln = (lo + c1) & BN_MASK2;
  ------------------
  |  |   94|    230|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  456|    230|        *p = ln;
  457|       |
  458|       |        /*
  459|       |         * The overflow will stop before we over write words we should not
  460|       |         * overwrite
  461|       |         */
  462|    230|        if (ln < (BN_ULONG)c1) {
  ------------------
  |  Branch (462:13): [True: 86, False: 144]
  ------------------
  463|  3.75k|            do {
  464|  3.75k|                p++;
  465|  3.75k|                lo = *p;
  466|  3.75k|                ln = (lo + 1) & BN_MASK2;
  ------------------
  |  |   94|  3.75k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  467|  3.75k|                *p = ln;
  468|  3.75k|            } while (ln == 0);
  ------------------
  |  Branch (468:22): [True: 3.66k, False: 86]
  ------------------
  469|     86|        }
  470|    230|    }
  471|  1.60k|}
BN_mul:
  498|  2.64k|{
  499|  2.64k|    int ret = bn_mul_fixed_top(r, a, b, ctx);
  500|       |
  501|  2.64k|    bn_correct_top(r);
  502|  2.64k|    bn_check_top(r);
  503|       |
  504|  2.64k|    return ret;
  505|  2.64k|}
bn_mul_fixed_top:
  508|  2.64k|{
  509|  2.64k|    int ret = 0;
  510|  2.64k|    int top, al, bl;
  511|  2.64k|    BIGNUM *rr;
  512|  2.64k|#if defined(BN_MUL_COMBA) || defined(BN_RECURSION)
  513|  2.64k|    int i;
  514|  2.64k|#endif
  515|  2.64k|#ifdef BN_RECURSION
  516|  2.64k|    BIGNUM *t = NULL;
  517|  2.64k|    int j = 0, k;
  518|  2.64k|#endif
  519|       |
  520|  2.64k|    bn_check_top(a);
  521|  2.64k|    bn_check_top(b);
  522|  2.64k|    bn_check_top(r);
  523|       |
  524|  2.64k|    al = a->top;
  525|  2.64k|    bl = b->top;
  526|       |
  527|  2.64k|    if ((al == 0) || (bl == 0)) {
  ------------------
  |  Branch (527:9): [True: 495, False: 2.15k]
  |  Branch (527:22): [True: 0, False: 2.15k]
  ------------------
  528|    495|        BN_zero(r);
  ------------------
  |  |  202|    495|#  define BN_zero(a)      BN_zero_ex(a)
  ------------------
  529|    495|        return 1;
  530|    495|    }
  531|  2.15k|    top = al + bl;
  532|       |
  533|  2.15k|    BN_CTX_start(ctx);
  534|  2.15k|    if ((r == a) || (r == b)) {
  ------------------
  |  Branch (534:9): [True: 0, False: 2.15k]
  |  Branch (534:21): [True: 0, False: 2.15k]
  ------------------
  535|      0|        if ((rr = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (535:13): [True: 0, False: 0]
  ------------------
  536|      0|            goto err;
  537|      0|    } else
  538|  2.15k|        rr = r;
  539|       |
  540|  2.15k|#if defined(BN_MUL_COMBA) || defined(BN_RECURSION)
  541|  2.15k|    i = al - bl;
  542|  2.15k|#endif
  543|  2.15k|#ifdef BN_MUL_COMBA
  544|  2.15k|    if (i == 0) {
  ------------------
  |  Branch (544:9): [True: 671, False: 1.48k]
  ------------------
  545|       |# if 0
  546|       |        if (al == 4) {
  547|       |            if (bn_wexpand(rr, 8) == NULL)
  548|       |                goto err;
  549|       |            rr->top = 8;
  550|       |            bn_mul_comba4(rr->d, a->d, b->d);
  551|       |            goto end;
  552|       |        }
  553|       |# endif
  554|    671|        if (al == 8) {
  ------------------
  |  Branch (554:13): [True: 1, False: 670]
  ------------------
  555|      1|            if (bn_wexpand(rr, 16) == NULL)
  ------------------
  |  Branch (555:17): [True: 0, False: 1]
  ------------------
  556|      0|                goto err;
  557|      1|            rr->top = 16;
  558|      1|            bn_mul_comba8(rr->d, a->d, b->d);
  559|      1|            goto end;
  560|      1|        }
  561|    671|    }
  562|  2.15k|#endif                          /* BN_MUL_COMBA */
  563|  2.15k|#ifdef BN_RECURSION
  564|  2.15k|    if ((al >= BN_MULL_SIZE_NORMAL) && (bl >= BN_MULL_SIZE_NORMAL)) {
  ------------------
  |  |  364|  2.15k|# define BN_MULL_SIZE_NORMAL                     (16)/* 32 */
  ------------------
                  if ((al >= BN_MULL_SIZE_NORMAL) && (bl >= BN_MULL_SIZE_NORMAL)) {
  ------------------
  |  |  364|  1.29k|# define BN_MULL_SIZE_NORMAL                     (16)/* 32 */
  ------------------
  |  Branch (564:9): [True: 1.29k, False: 854]
  |  Branch (564:40): [True: 1.17k, False: 125]
  ------------------
  565|  1.17k|        if (i >= -1 && i <= 1) {
  ------------------
  |  Branch (565:13): [True: 1.14k, False: 32]
  |  Branch (565:24): [True: 1.06k, False: 78]
  ------------------
  566|       |            /*
  567|       |             * Find out the power of two lower or equal to the longest of the
  568|       |             * two numbers
  569|       |             */
  570|  1.06k|            if (i >= 0) {
  ------------------
  |  Branch (570:17): [True: 935, False: 128]
  ------------------
  571|    935|                j = BN_num_bits_word((BN_ULONG)al);
  572|    935|            }
  573|  1.06k|            if (i == -1) {
  ------------------
  |  Branch (573:17): [True: 128, False: 935]
  ------------------
  574|    128|                j = BN_num_bits_word((BN_ULONG)bl);
  575|    128|            }
  576|  1.06k|            j = 1 << (j - 1);
  577|  1.06k|            assert(j <= al || j <= bl);
  578|  1.06k|            k = j + j;
  579|  1.06k|            t = BN_CTX_get(ctx);
  580|  1.06k|            if (t == NULL)
  ------------------
  |  Branch (580:17): [True: 0, False: 1.06k]
  ------------------
  581|      0|                goto err;
  582|  1.06k|            if (al > j || bl > j) {
  ------------------
  |  Branch (582:17): [True: 768, False: 295]
  |  Branch (582:27): [True: 62, False: 233]
  ------------------
  583|    830|                if (bn_wexpand(t, k * 4) == NULL)
  ------------------
  |  Branch (583:21): [True: 0, False: 830]
  ------------------
  584|      0|                    goto err;
  585|    830|                if (bn_wexpand(rr, k * 4) == NULL)
  ------------------
  |  Branch (585:21): [True: 0, False: 830]
  ------------------
  586|      0|                    goto err;
  587|    830|                bn_mul_part_recursive(rr->d, a->d, b->d,
  588|    830|                                      j, al - j, bl - j, t->d);
  589|    830|            } else {            /* al <= j || bl <= j */
  590|       |
  591|    233|                if (bn_wexpand(t, k * 2) == NULL)
  ------------------
  |  Branch (591:21): [True: 0, False: 233]
  ------------------
  592|      0|                    goto err;
  593|    233|                if (bn_wexpand(rr, k * 2) == NULL)
  ------------------
  |  Branch (593:21): [True: 0, False: 233]
  ------------------
  594|      0|                    goto err;
  595|    233|                bn_mul_recursive(rr->d, a->d, b->d, j, al - j, bl - j, t->d);
  596|    233|            }
  597|  1.06k|            rr->top = top;
  598|  1.06k|            goto end;
  599|  1.06k|        }
  600|  1.17k|    }
  601|  1.08k|#endif                          /* BN_RECURSION */
  602|  1.08k|    if (bn_wexpand(rr, top) == NULL)
  ------------------
  |  Branch (602:9): [True: 0, False: 1.08k]
  ------------------
  603|      0|        goto err;
  604|  1.08k|    rr->top = top;
  605|  1.08k|    bn_mul_normal(rr->d, a->d, al, b->d, bl);
  606|       |
  607|  1.08k|#if defined(BN_MUL_COMBA) || defined(BN_RECURSION)
  608|  2.15k| end:
  609|  2.15k|#endif
  610|  2.15k|    rr->neg = a->neg ^ b->neg;
  611|  2.15k|    rr->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  226|  2.15k|#  define BN_FLG_FIXED_TOP 0
  ------------------
  612|  2.15k|    if (r != rr && BN_copy(r, rr) == NULL)
  ------------------
  |  Branch (612:9): [True: 0, False: 2.15k]
  |  Branch (612:20): [True: 0, False: 0]
  ------------------
  613|      0|        goto err;
  614|       |
  615|  2.15k|    ret = 1;
  616|  2.15k| err:
  617|  2.15k|    bn_check_top(r);
  618|  2.15k|    BN_CTX_end(ctx);
  619|  2.15k|    return ret;
  620|  2.15k|}
bn_mul_normal:
  623|  1.95k|{
  624|  1.95k|    BN_ULONG *rr;
  ------------------
  |  |   37|  1.95k|#  define BN_ULONG        unsigned long
  ------------------
  625|       |
  626|  1.95k|    if (na < nb) {
  ------------------
  |  Branch (626:9): [True: 656, False: 1.29k]
  ------------------
  627|    656|        int itmp;
  628|    656|        BN_ULONG *ltmp;
  ------------------
  |  |   37|    656|#  define BN_ULONG        unsigned long
  ------------------
  629|       |
  630|    656|        itmp = na;
  631|    656|        na = nb;
  632|    656|        nb = itmp;
  633|    656|        ltmp = a;
  634|    656|        a = b;
  635|    656|        b = ltmp;
  636|       |
  637|    656|    }
  638|  1.95k|    rr = &(r[na]);
  639|  1.95k|    if (nb <= 0) {
  ------------------
  |  Branch (639:9): [True: 451, False: 1.50k]
  ------------------
  640|    451|        (void)bn_mul_words(r, a, na, 0);
  641|    451|        return;
  642|    451|    } else
  643|  1.50k|        rr[0] = bn_mul_words(r, a, na, b[0]);
  644|       |
  645|  26.5k|    for (;;) {
  646|  26.5k|        if (--nb <= 0)
  ------------------
  |  Branch (646:13): [True: 1.08k, False: 25.4k]
  ------------------
  647|  1.08k|            return;
  648|  25.4k|        rr[1] = bn_mul_add_words(&(r[1]), a, na, b[1]);
  649|  25.4k|        if (--nb <= 0)
  ------------------
  |  Branch (649:13): [True: 188, False: 25.2k]
  ------------------
  650|    188|            return;
  651|  25.2k|        rr[2] = bn_mul_add_words(&(r[2]), a, na, b[2]);
  652|  25.2k|        if (--nb <= 0)
  ------------------
  |  Branch (652:13): [True: 137, False: 25.1k]
  ------------------
  653|    137|            return;
  654|  25.1k|        rr[3] = bn_mul_add_words(&(r[3]), a, na, b[3]);
  655|  25.1k|        if (--nb <= 0)
  ------------------
  |  Branch (655:13): [True: 99, False: 25.0k]
  ------------------
  656|     99|            return;
  657|  25.0k|        rr[4] = bn_mul_add_words(&(r[4]), a, na, b[4]);
  658|  25.0k|        rr += 4;
  659|  25.0k|        r += 4;
  660|  25.0k|        b += 4;
  661|  25.0k|    }
  662|  1.50k|}

bn_lshift_fixed_top:
  105|  2.64k|{
  106|  2.64k|    int i, nw;
  107|  2.64k|    unsigned int lb, rb;
  108|  2.64k|    BN_ULONG *t, *f;
  ------------------
  |  |   37|  2.64k|#  define BN_ULONG        unsigned long
  ------------------
  109|  2.64k|    BN_ULONG l, m, rmask = 0;
  ------------------
  |  |   37|  2.64k|#  define BN_ULONG        unsigned long
  ------------------
  110|       |
  111|  2.64k|    assert(n >= 0);
  112|       |
  113|  2.64k|    bn_check_top(r);
  114|  2.64k|    bn_check_top(a);
  115|       |
  116|  2.64k|    nw = n / BN_BITS2;
  ------------------
  |  |   54|  2.64k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.64k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  117|  2.64k|    if (bn_wexpand(r, a->top + nw + 1) == NULL)
  ------------------
  |  Branch (117:9): [True: 0, False: 2.64k]
  ------------------
  118|      0|        return 0;
  119|       |
  120|  2.64k|    if (a->top != 0) {
  ------------------
  |  Branch (120:9): [True: 2.33k, False: 315]
  ------------------
  121|  2.33k|        lb = (unsigned int)n % BN_BITS2;
  ------------------
  |  |   54|  2.33k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.33k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  122|  2.33k|        rb = BN_BITS2 - lb;
  ------------------
  |  |   54|  2.33k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.33k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  123|  2.33k|        rb %= BN_BITS2;            /* say no to undefined behaviour */
  ------------------
  |  |   54|  2.33k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.33k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  124|  2.33k|        rmask = (BN_ULONG)0 - rb;  /* rmask = 0 - (rb != 0) */
  125|  2.33k|        rmask |= rmask >> 8;
  126|  2.33k|        f = &(a->d[0]);
  127|  2.33k|        t = &(r->d[nw]);
  128|  2.33k|        l = f[a->top - 1];
  129|  2.33k|        t[a->top] = (l >> rb) & rmask;
  130|  1.58M|        for (i = a->top - 1; i > 0; i--) {
  ------------------
  |  Branch (130:30): [True: 1.58M, False: 2.33k]
  ------------------
  131|  1.58M|            m = l << lb;
  132|  1.58M|            l = f[i - 1];
  133|  1.58M|            t[i] = (m | ((l >> rb) & rmask)) & BN_MASK2;
  ------------------
  |  |   94|  1.58M|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  134|  1.58M|        }
  135|  2.33k|        t[0] = (l << lb) & BN_MASK2;
  ------------------
  |  |   94|  2.33k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  136|  2.33k|    } else {
  137|       |        /* shouldn't happen, but formally required */
  138|    315|        r->d[nw] = 0;
  139|    315|    }
  140|  2.64k|    if (nw != 0)
  ------------------
  |  Branch (140:9): [True: 0, False: 2.64k]
  ------------------
  141|      0|        memset(r->d, 0, sizeof(*t) * nw);
  142|       |
  143|  2.64k|    r->neg = a->neg;
  144|  2.64k|    r->top = a->top + nw + 1;
  145|  2.64k|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  226|  2.64k|#  define BN_FLG_FIXED_TOP 0
  ------------------
  146|       |
  147|  2.64k|    return 1;
  148|  2.64k|}
bn_rshift_fixed_top:
  174|  2.64k|{
  175|  2.64k|    int i, top, nw;
  176|  2.64k|    unsigned int lb, rb;
  177|  2.64k|    BN_ULONG *t, *f;
  ------------------
  |  |   37|  2.64k|#  define BN_ULONG        unsigned long
  ------------------
  178|  2.64k|    BN_ULONG l, m, mask;
  ------------------
  |  |   37|  2.64k|#  define BN_ULONG        unsigned long
  ------------------
  179|       |
  180|  2.64k|    bn_check_top(r);
  181|  2.64k|    bn_check_top(a);
  182|       |
  183|  2.64k|    assert(n >= 0);
  184|       |
  185|  2.64k|    nw = n / BN_BITS2;
  ------------------
  |  |   54|  2.64k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.64k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  186|  2.64k|    if (nw >= a->top) {
  ------------------
  |  Branch (186:9): [True: 0, False: 2.64k]
  ------------------
  187|       |        /* shouldn't happen, but formally required */
  188|      0|        BN_zero(r);
  ------------------
  |  |  202|      0|#  define BN_zero(a)      BN_zero_ex(a)
  ------------------
  189|      0|        return 1;
  190|      0|    }
  191|       |
  192|  2.64k|    rb = (unsigned int)n % BN_BITS2;
  ------------------
  |  |   54|  2.64k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.64k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  193|  2.64k|    lb = BN_BITS2 - rb;
  ------------------
  |  |   54|  2.64k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.64k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  194|  2.64k|    lb %= BN_BITS2;            /* say no to undefined behaviour */
  ------------------
  |  |   54|  2.64k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.64k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  195|  2.64k|    mask = (BN_ULONG)0 - lb;   /* mask = 0 - (lb != 0) */
  196|  2.64k|    mask |= mask >> 8;
  197|  2.64k|    top = a->top - nw;
  198|  2.64k|    if (r != a && bn_wexpand(r, top) == NULL)
  ------------------
  |  Branch (198:9): [True: 2.64k, False: 0]
  |  Branch (198:19): [True: 0, False: 2.64k]
  ------------------
  199|      0|        return 0;
  200|       |
  201|  2.64k|    t = &(r->d[0]);
  202|  2.64k|    f = &(a->d[nw]);
  203|  2.64k|    l = f[0];
  204|  1.00M|    for (i = 0; i < top - 1; i++) {
  ------------------
  |  Branch (204:17): [True: 1.00M, False: 2.64k]
  ------------------
  205|  1.00M|        m = f[i + 1];
  206|  1.00M|        t[i] = (l >> rb) | ((m << lb) & mask);
  207|  1.00M|        l = m;
  208|  1.00M|    }
  209|  2.64k|    t[i] = l >> rb;
  210|       |
  211|  2.64k|    r->neg = a->neg;
  212|  2.64k|    r->top = top;
  213|  2.64k|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  226|  2.64k|#  define BN_FLG_FIXED_TOP 0
  ------------------
  214|       |
  215|  2.64k|    return 1;
  216|  2.64k|}

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:
  177|      2|{
  178|      2|# ifndef OPENSSL_NO_ERR
  179|      2|    if (ERR_reason_error_string(CMP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (179:9): [True: 2, False: 0]
  ------------------
  180|      2|        ERR_load_strings_const(CMP_str_reasons);
  181|      2|# endif
  182|      2|    return 1;
  183|      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:
  171|      2|{
  172|      2|# ifndef OPENSSL_NO_ERR
  173|      2|    if (ERR_reason_error_string(CMS_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (173:9): [True: 2, False: 0]
  ------------------
  174|      2|        ERR_load_strings_const(CMS_str_reasons);
  175|      2|# endif
  176|      2|    return 1;
  177|      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|}

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|}

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

CONF_modules_unload:
  482|      2|{
  483|      2|    int i;
  484|      2|    CONF_MODULE *md;
  485|       |
  486|      2|    if (!conf_modules_finish_int()) /* also inits module list lock */
  ------------------
  |  Branch (486:9): [True: 0, False: 2]
  ------------------
  487|      0|        return;
  488|       |
  489|      2|    if (!CRYPTO_THREAD_write_lock(module_list_lock))
  ------------------
  |  Branch (489:9): [True: 0, False: 2]
  ------------------
  490|      0|        return;
  491|       |
  492|       |    /* unload modules in reverse order */
  493|      2|    for (i = sk_CONF_MODULE_num(supported_modules) - 1; i >= 0; i--) {
  ------------------
  |  Branch (493:57): [True: 0, False: 2]
  ------------------
  494|      0|        md = sk_CONF_MODULE_value(supported_modules, i);
  495|       |        /* If static or in use and 'all' not set ignore it */
  496|      0|        if (((md->links > 0) || !md->dso) && !all)
  ------------------
  |  Branch (496:14): [True: 0, False: 0]
  |  Branch (496:33): [True: 0, False: 0]
  |  Branch (496:46): [True: 0, False: 0]
  ------------------
  497|      0|            continue;
  498|       |        /* Since we're working in reverse this is OK */
  499|      0|        (void)sk_CONF_MODULE_delete(supported_modules, i);
  500|      0|        module_free(md);
  501|      0|    }
  502|       |
  503|      2|    if (sk_CONF_MODULE_num(supported_modules) == 0) {
  ------------------
  |  Branch (503:9): [True: 0, False: 2]
  ------------------
  504|      0|        sk_CONF_MODULE_free(supported_modules);
  505|      0|        supported_modules = NULL;
  506|      0|    }
  507|       |
  508|      2|    CRYPTO_THREAD_unlock(module_list_lock);
  509|      2|}
ossl_config_modules_free:
  576|      2|{
  577|      2|    CONF_modules_unload(1); /* calls CONF_modules_finish */
  578|      2|    module_lists_free();
  579|      2|}
conf_mod.c:do_init_module_list_lock:
  100|      2|{
  101|      2|    module_list_lock = CRYPTO_THREAD_lock_new();
  102|      2|    if (module_list_lock == NULL) {
  ------------------
  |  Branch (102:9): [True: 0, False: 2]
  ------------------
  103|      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),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  300|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  104|      0|        return 0;
  105|      0|    }
  106|       |
  107|      2|    return 1;
  108|      2|}
conf_mod.c:conf_modules_finish_int:
  522|      2|{
  523|      2|    CONF_IMODULE *imod;
  524|       |
  525|      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 (525:9): [True: 0, False: 2]
  ------------------
  526|      0|        return 0;
  527|       |
  528|       |    /* If module_list_lock is NULL here it means we were already unloaded */
  529|      2|    if (module_list_lock == NULL
  ------------------
  |  Branch (529:9): [True: 0, False: 2]
  ------------------
  530|      2|        || !CRYPTO_THREAD_write_lock(module_list_lock))
  ------------------
  |  Branch (530:12): [True: 0, False: 2]
  ------------------
  531|      0|        return 0;
  532|       |
  533|      2|    while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
  ------------------
  |  Branch (533:12): [True: 0, False: 2]
  ------------------
  534|      0|        imod = sk_CONF_IMODULE_pop(initialized_modules);
  535|      0|        module_finish(imod);
  536|      0|    }
  537|      2|    sk_CONF_IMODULE_free(initialized_modules);
  538|      2|    initialized_modules = NULL;
  539|       |
  540|      2|    CRYPTO_THREAD_unlock(module_list_lock);
  541|       |
  542|      2|    return 1;
  543|      2|}
conf_mod.c:module_lists_free:
   88|      2|{
   89|      2|    CRYPTO_THREAD_lock_free(module_list_lock);
   90|      2|    module_list_lock = NULL;
   91|       |
   92|      2|    sk_CONF_MODULE_free(supported_modules);
   93|      2|    supported_modules = NULL;
   94|       |
   95|      2|    sk_CONF_IMODULE_free(initialized_modules);
   96|      2|    initialized_modules = NULL;
   97|      2|}

ossl_lib_ctx_default_deinit:
  387|      2|{
  388|      2|    if (!default_context_inited)
  ------------------
  |  Branch (388:9): [True: 2, False: 0]
  ------------------
  389|      2|        return;
  390|      0|    context_deinit(&default_context_int);
  391|      0|    CRYPTO_THREAD_cleanup_local(&default_context_thread_local);
  392|      0|    default_context_inited = 0;
  393|      0|}

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_err_load_DH_strings:
   67|      2|{
   68|      2|# ifndef OPENSSL_NO_ERR
   69|      2|    if (ERR_reason_error_string(DH_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (69:9): [True: 2, False: 0]
  ------------------
   70|      2|        ERR_load_strings_const(DH_str_reasons);
   71|      2|# endif
   72|      2|    return 1;
   73|      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_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);
  ------------------
  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  ------------------
                  CRYPTO_free(state, OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  280|      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|     70|{
  273|     70|#ifndef OPENSSL_NO_ERR
  274|     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 (274:9): [True: 0, False: 70]
  ------------------
  275|      0|        return 0;
  276|       |
  277|     70|    err_load_strings(ERR_str_libraries);
  278|     70|    err_load_strings(ERR_str_reasons);
  279|     70|#endif
  280|     70|    return 1;
  281|     70|}
ERR_load_strings_const:
  297|     68|{
  298|     68|#ifndef OPENSSL_NO_ERR
  299|     68|    if (ossl_err_load_ERR_strings() == 0)
  ------------------
  |  Branch (299:9): [True: 0, False: 68]
  ------------------
  300|      0|        return 0;
  301|     68|    err_load_strings(str);
  302|     68|#endif
  303|       |
  304|     68|    return 1;
  305|     68|}
ERR_clear_error:
  335|  2.67k|{
  336|  2.67k|    int i;
  337|  2.67k|    ERR_STATE *es;
  338|       |
  339|  2.67k|    es = ossl_err_get_state_int();
  340|  2.67k|    if (es == NULL)
  ------------------
  |  Branch (340:9): [True: 0, False: 2.67k]
  ------------------
  341|      0|        return;
  342|       |
  343|  45.4k|    for (i = 0; i < ERR_NUM_ERRORS; i++) {
  ------------------
  |  |   55|  45.4k|#  define ERR_NUM_ERRORS  16
  ------------------
  |  Branch (343:17): [True: 42.7k, False: 2.67k]
  ------------------
  344|  42.7k|        err_clear(es, i, 0);
  345|  42.7k|    }
  346|  2.67k|    es->top = es->bottom = 0;
  347|  2.67k|}
ERR_reason_error_string:
  613|     68|{
  614|     68|#ifndef OPENSSL_NO_ERR
  615|     68|    ERR_STRING_DATA d, *p = NULL;
  616|     68|    unsigned long l, r;
  617|       |
  618|     68|    if (!RUN_ONCE(&err_string_init, do_err_strings_init)) {
  ------------------
  |  |  130|     68|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 68, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (618:9): [True: 0, False: 68]
  ------------------
  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|     68|    if (ERR_SYSTEM_ERROR(e))
  ------------------
  |  |  239|     68|# define ERR_SYSTEM_ERROR(errcode)      (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  218|     68|# define ERR_SYSTEM_FLAG                ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (239:41): [True: 0, False: 68]
  |  |  ------------------
  ------------------
  628|      0|        return NULL;
  629|       |
  630|     68|    l = ERR_GET_LIB(e);
  631|     68|    r = ERR_GET_REASON(e);
  632|     68|    d.error = ERR_PACK(l, 0, r);
  ------------------
  |  |  279|     68|    ( (((unsigned long)(lib)    & ERR_LIB_MASK   ) << ERR_LIB_OFFSET) | \
  |  |  ------------------
  |  |  |  |  227|     68|# define ERR_LIB_MASK                   0xFF
  |  |  ------------------
  |  |                   ( (((unsigned long)(lib)    & ERR_LIB_MASK   ) << ERR_LIB_OFFSET) | \
  |  |  ------------------
  |  |  |  |  226|     68|# define ERR_LIB_OFFSET                 23L
  |  |  ------------------
  |  |  280|     68|      (((unsigned long)(reason) & ERR_REASON_MASK)) )
  |  |  ------------------
  |  |  |  |  230|     68|# define ERR_REASON_MASK                0X7FFFFF
  |  |  ------------------
  ------------------
  633|     68|    p = int_err_get_item(&d);
  634|     68|    if (p == NULL) {
  ------------------
  |  Branch (634:9): [True: 68, False: 0]
  ------------------
  635|     68|        d.error = ERR_PACK(0, 0, r);
  ------------------
  |  |  279|     68|    ( (((unsigned long)(lib)    & ERR_LIB_MASK   ) << ERR_LIB_OFFSET) | \
  |  |  ------------------
  |  |  |  |  227|     68|# define ERR_LIB_MASK                   0xFF
  |  |  ------------------
  |  |                   ( (((unsigned long)(lib)    & ERR_LIB_MASK   ) << ERR_LIB_OFFSET) | \
  |  |  ------------------
  |  |  |  |  226|     68|# define ERR_LIB_OFFSET                 23L
  |  |  ------------------
  |  |  280|     68|      (((unsigned long)(reason) & ERR_REASON_MASK)) )
  |  |  ------------------
  |  |  |  |  230|     68|# define ERR_REASON_MASK                0X7FFFFF
  |  |  ------------------
  ------------------
  636|     68|        p = int_err_get_item(&d);
  637|     68|    }
  638|     68|    return ((p == NULL) ? NULL : p->string);
  ------------------
  |  Branch (638:13): [True: 68, False: 0]
  ------------------
  639|       |#else
  640|       |    return NULL;
  641|       |#endif
  642|     68|}
ossl_err_get_state_int:
  673|  2.67k|{
  674|  2.67k|    ERR_STATE *state;
  675|  2.67k|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|  2.67k|# define get_last_sys_error()    errno
  ------------------
  676|       |
  677|  2.67k|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|  2.67k|# define OPENSSL_INIT_BASE_ONLY              0x00040000L
  ------------------
  |  Branch (677:9): [True: 0, False: 2.67k]
  ------------------
  678|      0|        return NULL;
  679|       |
  680|  2.67k|    if (!RUN_ONCE(&err_init, err_do_init))
  ------------------
  |  |  130|  2.67k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2.67k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (680:9): [True: 0, False: 2.67k]
  ------------------
  681|      0|        return NULL;
  682|       |
  683|  2.67k|    state = CRYPTO_THREAD_get_local(&err_thread_local);
  684|  2.67k|    if (state == (ERR_STATE*)-1)
  ------------------
  |  Branch (684:9): [True: 0, False: 2.67k]
  ------------------
  685|      0|        return NULL;
  686|       |
  687|  2.67k|    if (state == NULL) {
  ------------------
  |  Branch (687:9): [True: 2, False: 2.67k]
  ------------------
  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);
  ------------------
  |  |  450|      2|# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS    0x00000002L
  ------------------
  706|      2|    }
  707|       |
  708|  2.67k|    set_sys_error(saveerrno);
  ------------------
  |  |   32|  2.67k|# define set_sys_error(e)        errno=(e)
  ------------------
  709|  2.67k|    return state;
  710|  2.67k|}
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.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_new(ossl_check_ERR_STRING_DATA_lh_hashfunc_type(hfn), ossl_check_ERR_STRING_DATA_lh_compfunc_type(cmp)))
  ------------------
  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|  8.63k|{
  173|  8.63k|    unsigned long ret, l;
  174|       |
  175|  8.63k|    l = a->error;
  176|  8.63k|    ret = l ^ ERR_GET_LIB(l);
  177|  8.63k|    return (ret ^ ret % 19 * 13);
  178|  8.63k|}
err.c:err_string_data_cmp:
  182|  5.87k|{
  183|  5.87k|    if (a->error == b->error)
  ------------------
  |  Branch (183:9): [True: 5.57k, False: 292]
  ------------------
  184|  5.57k|        return 0;
  185|    292|    return a->error > b->error ? 1 : -1;
  ------------------
  |  Branch (185:12): [True: 160, False: 132]
  ------------------
  186|  5.87k|}
err.c:err_load_strings:
  260|    208|{
  261|    208|    if (!CRYPTO_THREAD_write_lock(err_string_lock))
  ------------------
  |  Branch (261:9): [True: 0, False: 208]
  ------------------
  262|      0|        return 0;
  263|  8.70k|    for (; str->error; str++)
  ------------------
  |  Branch (263:12): [True: 8.49k, False: 208]
  ------------------
  264|  8.49k|        (void)lh_ERR_STRING_DATA_insert(int_error_hash,
  ------------------
  |  |  378|  8.70k|#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|    208|                                       (ERR_STRING_DATA *)str);
  266|    208|    CRYPTO_THREAD_unlock(err_string_lock);
  267|    208|    return 1;
  268|    208|}
err.c:int_err_get_item:
  189|    136|{
  190|    136|    ERR_STRING_DATA *p = NULL;
  191|       |
  192|    136|    if (!CRYPTO_THREAD_read_lock(err_string_lock))
  ------------------
  |  Branch (192:9): [True: 0, False: 136]
  ------------------
  193|      0|        return NULL;
  194|    136|    p = lh_ERR_STRING_DATA_retrieve(int_error_hash, d);
  ------------------
  |  |  380|    136|#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|    136|    CRYPTO_THREAD_unlock(err_string_lock);
  196|       |
  197|    136|    return p;
  198|    136|}
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.c:err_clear:
   85|  42.7k|{
   86|  42.7k|    err_clear_data(es, i, (deall));
   87|  42.7k|    es->err_marks[i] = 0;
   88|  42.7k|    es->err_flags[i] = 0;
   89|  42.7k|    es->err_buffer[i] = 0;
   90|  42.7k|    es->err_line[i] = -1;
   91|  42.7k|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  107|  42.7k|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|  42.7k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|  42.7k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   92|  42.7k|    es->err_file[i] = NULL;
   93|  42.7k|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  107|  42.7k|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|  42.7k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|  42.7k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|  42.7k|    es->err_func[i] = NULL;
   95|  42.7k|}
err.c:err_clear_data:
   22|  42.7k|{
   23|  42.7k|    if (es->err_data_flags[i] & ERR_TXT_MALLOCED) {
  ------------------
  |  |   48|  42.7k|# define ERR_TXT_MALLOCED        0x01
  ------------------
  |  Branch (23:9): [True: 0, False: 42.7k]
  ------------------
   24|      0|        if (deall) {
  ------------------
  |  Branch (24:13): [True: 0, False: 0]
  ------------------
   25|      0|            OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  107|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      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|  42.7k|    } else {
   34|  42.7k|        es->err_data[i] = NULL;
   35|  42.7k|        es->err_data_size[i] = 0;
   36|  42.7k|        es->err_data_flags[i] = 0;
   37|  42.7k|    }
   38|  42.7k|}

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|}

ossl_err_load_EVP_strings:
  202|      2|{
  203|      2|#ifndef OPENSSL_NO_ERR
  204|      2|    if (ERR_reason_error_string(EVP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (204:9): [True: 2, False: 0]
  ------------------
  205|      2|        ERR_load_strings_const(EVP_str_reasons);
  206|      2|#endif
  207|      2|    return 1;
  208|      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_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:
  636|      2|{
  637|      2|    if (app_pkey_methods != NULL)
  ------------------
  |  Branch (637:9): [True: 0, False: 2]
  ------------------
  638|      0|        sk_EVP_PKEY_METHOD_pop_free(app_pkey_methods, EVP_PKEY_meth_free);
  639|      2|}

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

OPENSSL_cleanup:
  352|      2|{
  353|      2|    OPENSSL_INIT_STOP *currhandler, *lasthandler;
  354|       |
  355|       |    /*
  356|       |     * At some point we should consider looking at this function with a view to
  357|       |     * moving most/all of this into onfree handlers in OSSL_LIB_CTX.
  358|       |     */
  359|       |
  360|       |    /* If we've not been inited then no need to deinit */
  361|      2|    if (!base_inited)
  ------------------
  |  Branch (361:9): [True: 0, False: 2]
  ------------------
  362|      0|        return;
  363|       |
  364|       |    /* Might be explicitly called and also by atexit */
  365|      2|    if (stopped)
  ------------------
  |  Branch (365:9): [True: 0, False: 2]
  ------------------
  366|      0|        return;
  367|      2|    stopped = 1;
  368|       |
  369|       |    /*
  370|       |     * Thread stop may not get automatically called by the thread library for
  371|       |     * the very last thread in some situations, so call it directly.
  372|       |     */
  373|      2|    OPENSSL_thread_stop();
  374|       |
  375|      2|    currhandler = stop_handlers;
  376|      2|    while (currhandler != NULL) {
  ------------------
  |  Branch (376:12): [True: 0, False: 2]
  ------------------
  377|      0|        currhandler->handler();
  378|      0|        lasthandler = currhandler;
  379|      0|        currhandler = currhandler->next;
  380|      0|        OPENSSL_free(lasthandler);
  ------------------
  |  |  107|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  381|      0|    }
  382|      2|    stop_handlers = NULL;
  383|       |
  384|      2|    CRYPTO_THREAD_lock_free(optsdone_lock);
  385|      2|    optsdone_lock = NULL;
  386|      2|    CRYPTO_THREAD_lock_free(init_lock);
  387|      2|    init_lock = NULL;
  388|       |
  389|      2|    CRYPTO_THREAD_cleanup_local(&in_init_config_local);
  390|       |
  391|       |    /*
  392|       |     * We assume we are single-threaded for this function, i.e. no race
  393|       |     * conditions for the various "*_inited" vars below.
  394|       |     */
  395|       |
  396|      2|#ifndef OPENSSL_NO_COMP
  397|      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)
  |  |  ------------------
  ------------------
  398|      2|    ossl_comp_zlib_cleanup();
  399|      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)
  |  |  ------------------
  ------------------
  400|      2|    ossl_comp_brotli_cleanup();
  401|      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)
  |  |  ------------------
  ------------------
  402|      2|    ossl_comp_zstd_cleanup();
  403|      2|#endif
  404|       |
  405|      2|    if (async_inited) {
  ------------------
  |  Branch (405:9): [True: 0, False: 2]
  ------------------
  406|      0|        OSSL_TRACE(INIT, "OPENSSL_cleanup: async_deinit()\n");
  ------------------
  |  |  287|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  282|      0|#  define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  407|      0|        async_deinit();
  408|      0|    }
  409|       |
  410|       |    /*
  411|       |     * Note that cleanup order is important:
  412|       |     * - ossl_rand_cleanup_int could call an ENGINE's RAND cleanup function so
  413|       |     * must be called before engine_cleanup_int()
  414|       |     * - ENGINEs use CRYPTO_EX_DATA and therefore, must be cleaned up
  415|       |     * before the ex data handlers are wiped during default ossl_lib_ctx deinit.
  416|       |     * - ossl_config_modules_free() can end up in ENGINE code so must be called
  417|       |     * before engine_cleanup_int()
  418|       |     * - ENGINEs and additional EVP algorithms might use added OIDs names so
  419|       |     * ossl_obj_cleanup_int() must be called last
  420|       |     */
  421|      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)
  |  |  ------------------
  ------------------
  422|      2|    ossl_rand_cleanup_int();
  423|       |
  424|      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)
  |  |  ------------------
  ------------------
  425|      2|    ossl_config_modules_free();
  426|       |
  427|      2|#ifndef OPENSSL_NO_ENGINE
  428|      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)
  |  |  ------------------
  ------------------
  429|      2|    engine_cleanup_int();
  430|      2|#endif
  431|       |
  432|      2|#ifndef OPENSSL_NO_DEPRECATED_3_0
  433|      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)
  |  |  ------------------
  ------------------
  434|      2|    ossl_store_cleanup_int();
  435|      2|#endif
  436|       |
  437|      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)
  |  |  ------------------
  ------------------
  438|      2|    ossl_lib_ctx_default_deinit();
  439|       |
  440|      2|    ossl_cleanup_thread();
  441|       |
  442|      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)
  |  |  ------------------
  ------------------
  443|      2|    bio_cleanup();
  444|       |
  445|      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)
  |  |  ------------------
  ------------------
  446|      2|    evp_cleanup_int();
  447|       |
  448|      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)
  |  |  ------------------
  ------------------
  449|      2|    ossl_obj_cleanup_int();
  450|       |
  451|      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)
  |  |  ------------------
  ------------------
  452|      2|    err_cleanup();
  453|       |
  454|      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)
  |  |  ------------------
  ------------------
  455|      2|    CRYPTO_secure_malloc_done();
  456|       |
  457|      2|#ifndef OPENSSL_NO_CMP
  458|      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)
  |  |  ------------------
  ------------------
  459|      2|    OSSL_CMP_log_close();
  460|      2|#endif
  461|       |
  462|      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)
  |  |  ------------------
  ------------------
  463|      2|    ossl_trace_cleanup();
  464|       |
  465|      2|    base_inited = 0;
  466|      2|}
OPENSSL_init_crypto:
  474|  2.68k|{
  475|  2.68k|    uint64_t tmp;
  476|  2.68k|    int aloaddone = 0;
  477|       |
  478|       |   /* Applications depend on 0 being returned when cleanup was already done */
  479|  2.68k|    if (stopped) {
  ------------------
  |  Branch (479:9): [True: 0, False: 2.68k]
  ------------------
  480|      0|        if (!(opts & OPENSSL_INIT_BASE_ONLY))
  ------------------
  |  |   31|      0|# define OPENSSL_INIT_BASE_ONLY              0x00040000L
  ------------------
  |  Branch (480:13): [True: 0, False: 0]
  ------------------
  481|      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),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  300|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  482|      0|        return 0;
  483|      0|    }
  484|       |
  485|       |    /*
  486|       |     * We ignore failures from this function. It is probably because we are
  487|       |     * on a platform that doesn't support lockless atomic loads (we may not
  488|       |     * have created optsdone_lock yet so we can't use it). This is just an
  489|       |     * optimisation to skip the full checks in this function if we don't need
  490|       |     * to, so we carry on regardless in the event of failure.
  491|       |     *
  492|       |     * There could be a race here with other threads, so that optsdone has not
  493|       |     * been updated yet, even though the options have in fact been initialised.
  494|       |     * This doesn't matter - it just means we will run the full function
  495|       |     * unnecessarily - but all the critical code is contained in RUN_ONCE
  496|       |     * functions anyway so we are safe.
  497|       |     */
  498|  2.68k|    if (CRYPTO_atomic_load(&optsdone, &tmp, NULL)) {
  ------------------
  |  Branch (498:9): [True: 2.68k, False: 0]
  ------------------
  499|  2.68k|        if ((tmp & opts) == opts)
  ------------------
  |  Branch (499:13): [True: 2, False: 2.67k]
  ------------------
  500|      2|            return 1;
  501|  2.67k|        aloaddone = 1;
  502|  2.67k|    }
  503|       |
  504|       |    /*
  505|       |     * At some point we should look at this function with a view to moving
  506|       |     * most/all of this into OSSL_LIB_CTX.
  507|       |     *
  508|       |     * When the caller specifies OPENSSL_INIT_BASE_ONLY, that should be the
  509|       |     * *only* option specified.  With that option we return immediately after
  510|       |     * doing the requested limited initialization.  Note that
  511|       |     * err_shelve_state() called by us via ossl_init_load_crypto_nodelete()
  512|       |     * re-enters OPENSSL_init_crypto() with OPENSSL_INIT_BASE_ONLY, but with
  513|       |     * base already initialized this is a harmless NOOP.
  514|       |     *
  515|       |     * If we remain the only caller of err_shelve_state() the recursion should
  516|       |     * perhaps be removed, but if in doubt, it can be left in place.
  517|       |     */
  518|  2.67k|    if (!RUN_ONCE(&base, ossl_init_base))
  ------------------
  |  |  130|  2.67k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2.67k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (518:9): [True: 0, False: 2.67k]
  ------------------
  519|      0|        return 0;
  520|       |
  521|  2.67k|    if (opts & OPENSSL_INIT_BASE_ONLY)
  ------------------
  |  |   31|  2.67k|# define OPENSSL_INIT_BASE_ONLY              0x00040000L
  ------------------
  |  Branch (521:9): [True: 2.67k, False: 2]
  ------------------
  522|  2.67k|        return 1;
  523|       |
  524|       |    /*
  525|       |     * optsdone_lock should definitely be set up now, so we can now repeat the
  526|       |     * same check from above but be sure that it will work even on platforms
  527|       |     * without lockless CRYPTO_atomic_load
  528|       |     */
  529|      2|    if (!aloaddone) {
  ------------------
  |  Branch (529:9): [True: 0, False: 2]
  ------------------
  530|      0|        if (!CRYPTO_atomic_load(&optsdone, &tmp, optsdone_lock))
  ------------------
  |  Branch (530:13): [True: 0, False: 0]
  ------------------
  531|      0|            return 0;
  532|      0|        if ((tmp & opts) == opts)
  ------------------
  |  Branch (532:13): [True: 0, False: 0]
  ------------------
  533|      0|            return 1;
  534|      0|    }
  535|       |
  536|       |    /*
  537|       |     * Now we don't always set up exit handlers, the INIT_BASE_ONLY calls
  538|       |     * should not have the side-effect of setting up exit handlers, and
  539|       |     * therefore, this code block is below the INIT_BASE_ONLY-conditioned early
  540|       |     * return above.
  541|       |     */
  542|      2|    if ((opts & OPENSSL_INIT_NO_ATEXIT) != 0) {
  ------------------
  |  |  468|      2|# define OPENSSL_INIT_NO_ATEXIT              0x00080000L
  ------------------
  |  Branch (542:9): [True: 0, False: 2]
  ------------------
  543|      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 (543:13): [True: 0, False: 0]
  ------------------
  544|      0|                          ossl_init_register_atexit))
  545|      0|            return 0;
  546|      2|    } else if (!RUN_ONCE(&register_atexit, ossl_init_register_atexit)) {
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (546:16): [True: 0, False: 2]
  ------------------
  547|      0|        return 0;
  548|      0|    }
  549|       |
  550|      2|    if (!RUN_ONCE(&load_crypto_nodelete, ossl_init_load_crypto_nodelete))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (550:9): [True: 0, False: 2]
  ------------------
  551|      0|        return 0;
  552|       |
  553|      2|    if ((opts & OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS)
  ------------------
  |  |  449|      2|# define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L
  ------------------
  |  Branch (553:9): [True: 0, False: 2]
  ------------------
  554|      2|            && !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 (554:16): [True: 0, False: 0]
  ------------------
  555|      2|                             ossl_init_no_load_crypto_strings,
  556|      2|                             ossl_init_load_crypto_strings))
  557|      0|        return 0;
  558|       |
  559|      2|    if ((opts & OPENSSL_INIT_LOAD_CRYPTO_STRINGS)
  ------------------
  |  |  450|      2|# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS    0x00000002L
  ------------------
  |  Branch (559:9): [True: 2, False: 0]
  ------------------
  560|      2|            && !RUN_ONCE(&load_crypto_strings, ossl_init_load_crypto_strings))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (560:16): [True: 0, False: 2]
  ------------------
  561|      0|        return 0;
  562|       |
  563|      2|    if ((opts & OPENSSL_INIT_NO_ADD_ALL_CIPHERS)
  ------------------
  |  |  453|      2|# define OPENSSL_INIT_NO_ADD_ALL_CIPHERS     0x00000010L
  ------------------
  |  Branch (563:9): [True: 0, False: 2]
  ------------------
  564|      2|            && !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 (564:16): [True: 0, False: 0]
  ------------------
  565|      2|                             ossl_init_add_all_ciphers))
  566|      0|        return 0;
  567|       |
  568|      2|    if ((opts & OPENSSL_INIT_ADD_ALL_CIPHERS)
  ------------------
  |  |  451|      2|# define OPENSSL_INIT_ADD_ALL_CIPHERS        0x00000004L
  ------------------
  |  Branch (568:9): [True: 0, False: 2]
  ------------------
  569|      2|            && !RUN_ONCE(&add_all_ciphers, ossl_init_add_all_ciphers))
  ------------------
  |  |  130|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (569:16): [True: 0, False: 0]
  ------------------
  570|      0|        return 0;
  571|       |
  572|      2|    if ((opts & OPENSSL_INIT_NO_ADD_ALL_DIGESTS)
  ------------------
  |  |  454|      2|# define OPENSSL_INIT_NO_ADD_ALL_DIGESTS     0x00000020L
  ------------------
  |  Branch (572:9): [True: 0, False: 2]
  ------------------
  573|      2|            && !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 (573:16): [True: 0, False: 0]
  ------------------
  574|      2|                             ossl_init_add_all_digests))
  575|      0|        return 0;
  576|       |
  577|      2|    if ((opts & OPENSSL_INIT_ADD_ALL_DIGESTS)
  ------------------
  |  |  452|      2|# define OPENSSL_INIT_ADD_ALL_DIGESTS        0x00000008L
  ------------------
  |  Branch (577:9): [True: 0, False: 2]
  ------------------
  578|      2|            && !RUN_ONCE(&add_all_digests, ossl_init_add_all_digests))
  ------------------
  |  |  130|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (578:16): [True: 0, False: 0]
  ------------------
  579|      0|        return 0;
  580|       |
  581|      2|    if ((opts & OPENSSL_INIT_ATFORK)
  ------------------
  |  |  466|      2|# define OPENSSL_INIT_ATFORK                 0x00020000L
  ------------------
  |  Branch (581:9): [True: 0, False: 2]
  ------------------
  582|      2|            && !openssl_init_fork_handlers())
  ------------------
  |  Branch (582:16): [True: 0, False: 0]
  ------------------
  583|      0|        return 0;
  584|       |
  585|      2|    if ((opts & OPENSSL_INIT_NO_LOAD_CONFIG)
  ------------------
  |  |  456|      2|# define OPENSSL_INIT_NO_LOAD_CONFIG         0x00000080L
  ------------------
  |  Branch (585:9): [True: 0, False: 2]
  ------------------
  586|      2|            && !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 (586:16): [True: 0, False: 0]
  ------------------
  587|      0|        return 0;
  588|       |
  589|      2|    if (opts & OPENSSL_INIT_LOAD_CONFIG) {
  ------------------
  |  |  455|      2|# define OPENSSL_INIT_LOAD_CONFIG            0x00000040L
  ------------------
  |  Branch (589:9): [True: 0, False: 2]
  ------------------
  590|      0|        int loading = CRYPTO_THREAD_get_local(&in_init_config_local) != NULL;
  591|       |
  592|       |        /* If called recursively from OBJ_ calls, just skip it. */
  593|      0|        if (!loading) {
  ------------------
  |  Branch (593:13): [True: 0, False: 0]
  ------------------
  594|      0|            int ret;
  595|       |
  596|      0|            if (!CRYPTO_THREAD_set_local(&in_init_config_local, (void *)-1))
  ------------------
  |  Branch (596:17): [True: 0, False: 0]
  ------------------
  597|      0|                return 0;
  598|      0|            if (settings == NULL) {
  ------------------
  |  Branch (598:17): [True: 0, False: 0]
  ------------------
  599|      0|                ret = RUN_ONCE(&config, ossl_init_config);
  ------------------
  |  |  130|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  600|      0|            } else {
  601|      0|                if (!CRYPTO_THREAD_write_lock(init_lock))
  ------------------
  |  Branch (601:21): [True: 0, False: 0]
  ------------------
  602|      0|                    return 0;
  603|      0|                conf_settings = settings;
  604|      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]
  |  |  ------------------
  ------------------
  605|      0|                                   ossl_init_config);
  606|      0|                conf_settings = NULL;
  607|      0|                CRYPTO_THREAD_unlock(init_lock);
  608|      0|            }
  609|       |
  610|      0|            if (ret <= 0)
  ------------------
  |  Branch (610:17): [True: 0, False: 0]
  ------------------
  611|      0|                return 0;
  612|      0|        }
  613|      0|    }
  614|       |
  615|      2|    if ((opts & OPENSSL_INIT_ASYNC)
  ------------------
  |  |  457|      2|# define OPENSSL_INIT_ASYNC                  0x00000100L
  ------------------
  |  Branch (615:9): [True: 0, False: 2]
  ------------------
  616|      2|            && !RUN_ONCE(&async, ossl_init_async))
  ------------------
  |  |  130|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (616:16): [True: 0, False: 0]
  ------------------
  617|      0|        return 0;
  618|       |
  619|      2|#ifndef OPENSSL_NO_ENGINE
  620|      2|    if ((opts & OPENSSL_INIT_ENGINE_OPENSSL)
  ------------------
  |  |  460|      2|# define OPENSSL_INIT_ENGINE_OPENSSL         0x00000800L
  ------------------
  |  Branch (620:9): [True: 0, False: 2]
  ------------------
  621|      2|            && !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 (621:16): [True: 0, False: 0]
  ------------------
  622|      0|        return 0;
  623|      2|# ifndef OPENSSL_NO_RDRAND
  624|      2|    if ((opts & OPENSSL_INIT_ENGINE_RDRAND)
  ------------------
  |  |  458|      2|# define OPENSSL_INIT_ENGINE_RDRAND          0x00000200L
  ------------------
  |  Branch (624:9): [True: 0, False: 2]
  ------------------
  625|      2|            && !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 (625:16): [True: 0, False: 0]
  ------------------
  626|      0|        return 0;
  627|      2|# endif
  628|      2|    if ((opts & OPENSSL_INIT_ENGINE_DYNAMIC)
  ------------------
  |  |  459|      2|# define OPENSSL_INIT_ENGINE_DYNAMIC         0x00000400L
  ------------------
  |  Branch (628:9): [True: 0, False: 2]
  ------------------
  629|      2|            && !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 (629:16): [True: 0, False: 0]
  ------------------
  630|      0|        return 0;
  631|      2|# ifndef OPENSSL_NO_STATIC_ENGINE
  632|       |#  ifndef OPENSSL_NO_DEVCRYPTOENG
  633|       |    if ((opts & OPENSSL_INIT_ENGINE_CRYPTODEV)
  634|       |            && !RUN_ONCE(&engine_devcrypto, ossl_init_engine_devcrypto))
  635|       |        return 0;
  636|       |#  endif
  637|      2|#  if !defined(OPENSSL_NO_PADLOCKENG)
  638|      2|    if ((opts & OPENSSL_INIT_ENGINE_PADLOCK)
  ------------------
  |  |  463|      2|# define OPENSSL_INIT_ENGINE_PADLOCK         0x00004000L
  ------------------
  |  Branch (638:9): [True: 0, False: 2]
  ------------------
  639|      2|            && !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 (639:16): [True: 0, False: 0]
  ------------------
  640|      0|        return 0;
  641|      2|#  endif
  642|       |#  if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
  643|       |    if ((opts & OPENSSL_INIT_ENGINE_CAPI)
  644|       |            && !RUN_ONCE(&engine_capi, ossl_init_engine_capi))
  645|       |        return 0;
  646|       |#  endif
  647|      2|#  if !defined(OPENSSL_NO_AFALGENG)
  648|      2|    if ((opts & OPENSSL_INIT_ENGINE_AFALG)
  ------------------
  |  |  464|      2|# define OPENSSL_INIT_ENGINE_AFALG           0x00008000L
  ------------------
  |  Branch (648:9): [True: 0, False: 2]
  ------------------
  649|      2|            && !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 (649:16): [True: 0, False: 0]
  ------------------
  650|      0|        return 0;
  651|      2|#  endif
  652|      2|# endif
  653|      2|    if (opts & (OPENSSL_INIT_ENGINE_ALL_BUILTIN
  ------------------
  |  |  480|      2|    (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
  |  |  ------------------
  |  |  |  |  458|      2|# define OPENSSL_INIT_ENGINE_RDRAND          0x00000200L
  |  |  ------------------
  |  |                   (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
  |  |  ------------------
  |  |  |  |  459|      2|# define OPENSSL_INIT_ENGINE_DYNAMIC         0x00000400L
  |  |  ------------------
  |  |  481|      2|    | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | \
  |  |  ------------------
  |  |  |  |  461|      2|# define OPENSSL_INIT_ENGINE_CRYPTODEV       0x00001000L
  |  |  ------------------
  |  |                   | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | \
  |  |  ------------------
  |  |  |  |  462|      2|# define OPENSSL_INIT_ENGINE_CAPI            0x00002000L
  |  |  ------------------
  |  |  482|      2|    OPENSSL_INIT_ENGINE_PADLOCK)
  |  |  ------------------
  |  |  |  |  463|      2|# define OPENSSL_INIT_ENGINE_PADLOCK         0x00004000L
  |  |  ------------------
  ------------------
  |  Branch (653:9): [True: 0, False: 2]
  ------------------
  654|      2|                | OPENSSL_INIT_ENGINE_OPENSSL
  ------------------
  |  |  460|      2|# define OPENSSL_INIT_ENGINE_OPENSSL         0x00000800L
  ------------------
  655|      2|                | OPENSSL_INIT_ENGINE_AFALG)) {
  ------------------
  |  |  464|      2|# define OPENSSL_INIT_ENGINE_AFALG           0x00008000L
  ------------------
  656|      0|        ENGINE_register_all_complete();
  657|      0|    }
  658|      2|#endif
  659|       |
  660|      2|    if (!CRYPTO_atomic_or(&optsdone, opts, &tmp, optsdone_lock))
  ------------------
  |  Branch (660:9): [True: 0, False: 2]
  ------------------
  661|      0|        return 0;
  662|       |
  663|      2|    return 1;
  664|      2|}
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|       |#ifdef OPENSSL_INIT_DEBUG
  101|       |    fprintf(stderr, "OPENSSL_INIT: ossl_init_register_atexit()\n");
  102|       |#endif
  103|      2|#ifndef OPENSSL_SYS_UEFI
  104|       |# if defined(_WIN32) && !defined(__BORLANDC__)
  105|       |    /* We use _onexit() in preference because it gets called on DLL unload */
  106|       |    if (_onexit(win32atexit) == NULL)
  107|       |        return 0;
  108|       |# else
  109|      2|    if (atexit(OPENSSL_cleanup) != 0)
  ------------------
  |  Branch (109:9): [True: 0, False: 2]
  ------------------
  110|      0|        return 0;
  111|      2|# endif
  112|      2|#endif
  113|       |
  114|      2|    return 1;
  115|      2|}
init.c:ossl_init_load_crypto_nodelete:
  129|      2|{
  130|      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)
  |  |  ------------------
  ------------------
  131|       |
  132|       |#if !defined(OPENSSL_USE_NODELETE) \
  133|       |    && !defined(OPENSSL_NO_PINSHARED)
  134|       |# if defined(DSO_WIN32) && !defined(_WIN32_WCE)
  135|       |    {
  136|       |        HMODULE handle = NULL;
  137|       |        BOOL ret;
  138|       |
  139|       |        /* We don't use the DSO route for WIN32 because there is a better way */
  140|       |        ret = GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
  141|       |                                | GET_MODULE_HANDLE_EX_FLAG_PIN,
  142|       |                                (void *)&base_inited, &handle);
  143|       |
  144|       |        OSSL_TRACE1(INIT,
  145|       |                    "ossl_init_load_crypto_nodelete: "
  146|       |                    "obtained DSO reference? %s\n",
  147|       |                    (ret == TRUE ? "No!" : "Yes."));
  148|       |        return (ret == TRUE) ? 1 : 0;
  149|       |    }
  150|       |# elif !defined(DSO_NONE)
  151|       |    /*
  152|       |     * Deliberately leak a reference to ourselves. This will force the library
  153|       |     * to remain loaded until the atexit() handler is run at process exit.
  154|       |     */
  155|       |    {
  156|       |        DSO *dso;
  157|       |        void *err;
  158|       |
  159|       |        if (!err_shelve_state(&err))
  160|       |            return 0;
  161|       |
  162|       |        dso = DSO_dsobyaddr(&base_inited, DSO_FLAG_NO_UNLOAD_ON_FREE);
  163|       |        /*
  164|       |         * In case of No!, it is uncertain our exit()-handlers can still be
  165|       |         * called. After dlclose() the whole library might have been unloaded
  166|       |         * already.
  167|       |         */
  168|       |        OSSL_TRACE1(INIT, "obtained DSO reference? %s\n",
  169|       |                    (dso == NULL ? "No!" : "Yes."));
  170|       |        DSO_free(dso);
  171|       |        err_unshelve_state(err);
  172|       |    }
  173|       |# endif
  174|       |#endif
  175|       |
  176|      2|    return 1;
  177|      2|}
init.c:ossl_init_load_crypto_strings:
  182|      2|{
  183|      2|    int ret = 1;
  184|       |    /*
  185|       |     * OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time
  186|       |     * pulling in all the error strings during static linking
  187|       |     */
  188|      2|#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
  189|      2|    void *err;
  190|       |
  191|      2|    if (!err_shelve_state(&err))
  ------------------
  |  Branch (191:9): [True: 0, False: 2]
  ------------------
  192|      0|        return 0;
  193|       |
  194|      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)
  |  |  ------------------
  ------------------
  195|      2|    ret = ossl_err_load_crypto_strings();
  196|       |
  197|      2|    err_unshelve_state(err);
  198|      2|#endif
  199|      2|    return ret;
  200|      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);
  ------------------
  |  |  107|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  238|      2|    }
  239|      2|}
ossl_init_thread_start:
  348|      2|{
  349|      2|    THREAD_EVENT_HANDLER **hands;
  350|      2|    THREAD_EVENT_HANDLER *hand;
  351|       |#ifdef FIPS_MODULE
  352|       |    OSSL_LIB_CTX *ctx = arg;
  353|       |
  354|       |    /*
  355|       |     * In FIPS mode the list of THREAD_EVENT_HANDLERs is unique per combination
  356|       |     * of OSSL_LIB_CTX and thread. This is because in FIPS mode each
  357|       |     * OSSL_LIB_CTX gets informed about thread stop events individually.
  358|       |     */
  359|       |    CRYPTO_THREAD_LOCAL *local
  360|       |        = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_THREAD_EVENT_HANDLER_INDEX);
  361|       |#else
  362|       |    /*
  363|       |     * Outside of FIPS mode the list of THREAD_EVENT_HANDLERs is unique per
  364|       |     * thread, but may hold multiple OSSL_LIB_CTXs. We only get told about
  365|       |     * thread stop events globally, so we have to ensure all affected
  366|       |     * OSSL_LIB_CTXs are informed.
  367|       |     */
  368|      2|    CRYPTO_THREAD_LOCAL *local = &destructor_key.value;
  369|      2|#endif
  370|       |
  371|      2|    hands = init_get_thread_local(local, 1, 0);
  372|      2|    if (hands == NULL)
  ------------------
  |  Branch (372:9): [True: 0, False: 2]
  ------------------
  373|      0|        return 0;
  374|       |
  375|       |#ifdef FIPS_MODULE
  376|       |    if (*hands == NULL) {
  377|       |        /*
  378|       |         * We've not yet registered any handlers for this thread. We need to get
  379|       |         * libcrypto to tell us about later thread stop events. c_thread_start
  380|       |         * is a callback to libcrypto defined in fipsprov.c
  381|       |         */
  382|       |        if (!c_thread_start(FIPS_get_core_handle(ctx), ossl_arg_thread_stop,
  383|       |                            ctx))
  384|       |            return 0;
  385|       |    }
  386|       |#endif
  387|       |
  388|      2|    hand = OPENSSL_malloc(sizeof(*hand));
  ------------------
  |  |   97|      2|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  389|      2|    if (hand == NULL)
  ------------------
  |  Branch (389:9): [True: 0, False: 2]
  ------------------
  390|      0|        return 0;
  391|       |
  392|      2|    hand->handfn = handfn;
  393|      2|    hand->arg = arg;
  394|      2|#ifndef FIPS_MODULE
  395|      2|    hand->index = index;
  396|      2|#endif
  397|      2|    hand->next = *hands;
  398|      2|    *hands = hand;
  399|       |
  400|      2|    return 1;
  401|      2|}
initthread.c:init_get_thread_local:
   95|      4|{
   96|      4|    THREAD_EVENT_HANDLER **hands = CRYPTO_THREAD_get_local(local);
   97|       |
   98|      4|    if (alloc) {
  ------------------
  |  Branch (98:9): [True: 2, False: 2]
  ------------------
   99|      2|        if (hands == NULL) {
  ------------------
  |  Branch (99:13): [True: 2, False: 0]
  ------------------
  100|       |
  101|      2|            if ((hands = OPENSSL_zalloc(sizeof(*hands))) == NULL)
  ------------------
  |  |   99|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      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);
  ------------------
  |  |  107|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      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);
  ------------------
  |  |  107|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  113|      0|                return NULL;
  114|      0|            }
  115|      2|#endif
  116|      2|        }
  117|      2|    } else if (!keep) {
  ------------------
  |  Branch (117:16): [True: 2, False: 0]
  ------------------
  118|      2|        CRYPTO_THREAD_set_local(local, NULL);
  119|      2|    }
  120|       |
  121|      4|    return hands;
  122|      4|}
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));
  ------------------
  |  |   99|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      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);
  ------------------
  |  |  107|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      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:
  304|      2|{
  305|      2|    THREAD_EVENT_HANDLER *curr, *prev = NULL, *tmp;
  306|      2|#ifndef FIPS_MODULE
  307|      2|    GLOBAL_TEVENT_REGISTER *gtr;
  308|      2|#endif
  309|       |
  310|       |    /* Can't do much about this */
  311|      2|    if (hands == NULL)
  ------------------
  |  Branch (311:9): [True: 0, False: 2]
  ------------------
  312|      0|        return;
  313|       |
  314|      2|#ifndef FIPS_MODULE
  315|      2|    gtr = get_global_tevent_register();
  316|      2|    if (gtr == NULL)
  ------------------
  |  Branch (316:9): [True: 0, False: 2]
  ------------------
  317|      0|        return;
  318|       |
  319|      2|    if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (319:9): [True: 0, False: 2]
  ------------------
  320|      0|        return;
  321|      2|#endif
  322|       |
  323|      2|    curr = *hands;
  324|      4|    while (curr != NULL) {
  ------------------
  |  Branch (324:12): [True: 2, False: 2]
  ------------------
  325|      2|        if (arg != NULL && curr->arg != arg) {
  ------------------
  |  Branch (325:13): [True: 0, False: 2]
  |  Branch (325:28): [True: 0, False: 0]
  ------------------
  326|      0|            prev = curr;
  327|      0|            curr = curr->next;
  328|      0|            continue;
  329|      0|        }
  330|      2|        curr->handfn(curr->arg);
  331|      2|        if (prev == NULL)
  ------------------
  |  Branch (331:13): [True: 2, False: 0]
  ------------------
  332|      2|            *hands = curr->next;
  333|      0|        else
  334|      0|            prev->next = curr->next;
  335|       |
  336|      2|        tmp = curr;
  337|      2|        curr = curr->next;
  338|       |
  339|      2|        OPENSSL_free(tmp);
  ------------------
  |  |  107|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  340|      2|    }
  341|      2|#ifndef FIPS_MODULE
  342|      2|    CRYPTO_THREAD_unlock(gtr->lock);
  343|      2|#endif
  344|      2|}
initthread.c:init_thread_deregister:
  405|      2|{
  406|      2|    GLOBAL_TEVENT_REGISTER *gtr;
  407|      2|    int i;
  408|       |
  409|      2|    gtr = get_global_tevent_register();
  410|      2|    if (gtr == NULL)
  ------------------
  |  Branch (410:9): [True: 0, False: 2]
  ------------------
  411|      0|        return 0;
  412|      2|    if (!all) {
  ------------------
  |  Branch (412:9): [True: 0, False: 2]
  ------------------
  413|      0|        if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (413:13): [True: 0, False: 0]
  ------------------
  414|      0|            return 0;
  415|      2|    } else {
  416|      2|        glob_tevent_reg = NULL;
  417|      2|    }
  418|      2|    for (i = 0; i < sk_THREAD_EVENT_HANDLER_PTR_num(gtr->skhands); i++) {
  ------------------
  |  Branch (418:17): [True: 0, False: 2]
  ------------------
  419|      0|        THREAD_EVENT_HANDLER **hands
  420|      0|            = sk_THREAD_EVENT_HANDLER_PTR_value(gtr->skhands, i);
  421|      0|        THREAD_EVENT_HANDLER *curr = NULL, *prev = NULL, *tmp;
  422|       |
  423|      0|        if (hands == NULL) {
  ------------------
  |  Branch (423:13): [True: 0, False: 0]
  ------------------
  424|      0|            if (!all)
  ------------------
  |  Branch (424:17): [True: 0, False: 0]
  ------------------
  425|      0|                CRYPTO_THREAD_unlock(gtr->lock);
  426|      0|            return 0;
  427|      0|        }
  428|      0|        curr = *hands;
  429|      0|        while (curr != NULL) {
  ------------------
  |  Branch (429:16): [True: 0, False: 0]
  ------------------
  430|      0|            if (all || curr->index == index) {
  ------------------
  |  Branch (430:17): [True: 0, False: 0]
  |  Branch (430:24): [True: 0, False: 0]
  ------------------
  431|      0|                if (prev != NULL)
  ------------------
  |  Branch (431:21): [True: 0, False: 0]
  ------------------
  432|      0|                    prev->next = curr->next;
  433|      0|                else
  434|      0|                    *hands = curr->next;
  435|      0|                tmp = curr;
  436|      0|                curr = curr->next;
  437|      0|                OPENSSL_free(tmp);
  ------------------
  |  |  107|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  438|      0|                continue;
  439|      0|            }
  440|      0|            prev = curr;
  441|      0|            curr = curr->next;
  442|      0|        }
  443|      0|        if (all)
  ------------------
  |  Branch (443:13): [True: 0, False: 0]
  ------------------
  444|      0|            OPENSSL_free(hands);
  ------------------
  |  |  107|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  445|      0|    }
  446|      2|    if (all) {
  ------------------
  |  Branch (446:9): [True: 2, False: 0]
  ------------------
  447|      2|        CRYPTO_THREAD_lock_free(gtr->lock);
  448|      2|        sk_THREAD_EVENT_HANDLER_PTR_free(gtr->skhands);
  449|      2|        OPENSSL_free(gtr);
  ------------------
  |  |  107|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  450|      2|    } else {
  451|      0|        CRYPTO_THREAD_unlock(gtr->lock);
  452|      0|    }
  453|      2|    return 1;
  454|      2|}

OPENSSL_LH_new:
   48|      2|{
   49|      2|    OPENSSL_LHASH *ret;
   50|       |
   51|      2|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |   99|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (51:9): [True: 0, False: 2]
  ------------------
   52|      0|        return NULL;
   53|      2|    if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)
  ------------------
  |  |   99|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (53:9): [True: 0, False: 2]
  ------------------
   54|      0|        goto err;
   55|      2|    ret->comp = ((c == NULL) ? (OPENSSL_LH_COMPFUNC)strcmp : c);
  ------------------
  |  Branch (55:18): [True: 0, False: 2]
  ------------------
   56|      2|    ret->hash = ((h == NULL) ? (OPENSSL_LH_HASHFUNC)OPENSSL_LH_strhash : h);
  ------------------
  |  Branch (56:18): [True: 0, False: 2]
  ------------------
   57|      2|    ret->num_nodes = MIN_NODES / 2;
  ------------------
  |  |   39|      2|#define MIN_NODES       16
  ------------------
   58|      2|    ret->num_alloc_nodes = MIN_NODES;
  ------------------
  |  |   39|      2|#define MIN_NODES       16
  ------------------
   59|      2|    ret->pmax = MIN_NODES / 2;
  ------------------
  |  |   39|      2|#define MIN_NODES       16
  ------------------
   60|      2|    ret->up_load = UP_LOAD;
  ------------------
  |  |   40|      2|#define UP_LOAD         (2*LH_LOAD_MULT) /* load times 256 (default 2) */
  |  |  ------------------
  |  |  |  |   81|      2|# define LH_LOAD_MULT    256
  |  |  ------------------
  ------------------
   61|      2|    ret->down_load = DOWN_LOAD;
  ------------------
  |  |   41|      2|#define DOWN_LOAD       (LH_LOAD_MULT) /* load times 256 (default 1) */
  |  |  ------------------
  |  |  |  |   81|      2|# define LH_LOAD_MULT    256
  |  |  ------------------
  ------------------
   62|      2|    return ret;
   63|       |
   64|      0|err:
   65|      0|    OPENSSL_free(ret->b);
  ------------------
  |  |  107|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   66|      0|    OPENSSL_free(ret);
  ------------------
  |  |  107|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|      0|    return NULL;
   68|      2|}
OPENSSL_LH_free:
   71|      4|{
   72|      4|    if (lh == NULL)
  ------------------
  |  Branch (72:9): [True: 2, False: 2]
  ------------------
   73|      2|        return;
   74|       |
   75|      2|    OPENSSL_LH_flush(lh);
   76|      2|    OPENSSL_free(lh->b);
  ------------------
  |  |  107|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|      2|    OPENSSL_free(lh);
  ------------------
  |  |  107|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   78|      2|}
OPENSSL_LH_flush:
   81|      2|{
   82|      2|    unsigned int i;
   83|      2|    OPENSSL_LH_NODE *n, *nn;
   84|       |
   85|      2|    if (lh == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 2]
  ------------------
   86|      0|        return;
   87|       |
   88|  1.46k|    for (i = 0; i < lh->num_nodes; i++) {
  ------------------
  |  Branch (88:17): [True: 1.45k, False: 2]
  ------------------
   89|  1.45k|        n = lh->b[i];
   90|  4.37k|        while (n != NULL) {
  ------------------
  |  Branch (90:16): [True: 2.91k, False: 1.45k]
  ------------------
   91|  2.91k|            nn = n->next;
   92|  2.91k|            OPENSSL_free(n);
  ------------------
  |  |  107|  2.91k|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|  2.91k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|  2.91k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|  2.91k|            n = nn;
   94|  2.91k|        }
   95|  1.45k|        lh->b[i] = NULL;
   96|  1.45k|    }
   97|       |
   98|      2|    lh->num_items = 0;
   99|      2|}
OPENSSL_LH_insert:
  102|  8.49k|{
  103|  8.49k|    unsigned long hash;
  104|  8.49k|    OPENSSL_LH_NODE *nn, **rn;
  105|  8.49k|    void *ret;
  106|       |
  107|  8.49k|    lh->error = 0;
  108|  8.49k|    if ((lh->up_load <= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)) && !expand(lh))
  ------------------
  |  |   81|  8.49k|# define LH_LOAD_MULT    256
  ------------------
  |  Branch (108:9): [True: 1.44k, False: 7.05k]
  |  Branch (108:76): [True: 0, False: 1.44k]
  ------------------
  109|      0|        return NULL;        /* 'lh->error++' already done in 'expand' */
  110|       |
  111|  8.49k|    rn = getrn(lh, data, &hash);
  112|       |
  113|  8.49k|    if (*rn == NULL) {
  ------------------
  |  Branch (113:9): [True: 2.91k, False: 5.57k]
  ------------------
  114|  2.91k|        if ((nn = OPENSSL_malloc(sizeof(*nn))) == NULL) {
  ------------------
  |  |   97|  2.91k|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|  2.91k|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|  2.91k|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (114:13): [True: 0, False: 2.91k]
  ------------------
  115|      0|            lh->error++;
  116|      0|            return NULL;
  117|      0|        }
  118|  2.91k|        nn->data = data;
  119|  2.91k|        nn->next = NULL;
  120|  2.91k|        nn->hash = hash;
  121|  2.91k|        *rn = nn;
  122|  2.91k|        ret = NULL;
  123|  2.91k|        lh->num_items++;
  124|  5.57k|    } else {                    /* replace same key */
  125|  5.57k|        ret = (*rn)->data;
  126|  5.57k|        (*rn)->data = data;
  127|  5.57k|    }
  128|  8.49k|    return ret;
  129|  8.49k|}
OPENSSL_LH_retrieve:
  158|    136|{
  159|    136|    unsigned long hash;
  160|    136|    OPENSSL_LH_NODE **rn;
  161|       |
  162|    136|    if (lh->error != 0)
  ------------------
  |  Branch (162:9): [True: 0, False: 136]
  ------------------
  163|      0|        lh->error = 0;
  164|       |
  165|    136|    rn = getrn(lh, data, &hash);
  166|       |
  167|    136|    return *rn == NULL ? NULL : (*rn)->data;
  ------------------
  |  Branch (167:12): [True: 136, False: 0]
  ------------------
  168|    136|}
lhash.c:expand:
  208|  1.44k|{
  209|  1.44k|    OPENSSL_LH_NODE **n, **n1, **n2, *np;
  210|  1.44k|    unsigned int p, pmax, nni, j;
  211|  1.44k|    unsigned long hash;
  212|       |
  213|  1.44k|    nni = lh->num_alloc_nodes;
  214|  1.44k|    p = lh->p;
  215|  1.44k|    pmax = lh->pmax;
  216|  1.44k|    if (p + 1 >= pmax) {
  ------------------
  |  Branch (216:9): [True: 12, False: 1.43k]
  ------------------
  217|     12|        j = nni * 2;
  218|     12|        n = OPENSSL_realloc(lh->b, sizeof(OPENSSL_LH_NODE *) * j);
  ------------------
  |  |  101|     12|        CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|     12|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|     12|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  219|     12|        if (n == NULL) {
  ------------------
  |  Branch (219:13): [True: 0, False: 12]
  ------------------
  220|      0|            lh->error++;
  221|      0|            return 0;
  222|      0|        }
  223|     12|        lh->b = n;
  224|     12|        memset(n + nni, 0, sizeof(*n) * (j - nni));
  225|     12|        lh->pmax = nni;
  226|     12|        lh->num_alloc_nodes = j;
  227|     12|        lh->p = 0;
  228|  1.43k|    } else {
  229|  1.43k|        lh->p++;
  230|  1.43k|    }
  231|       |
  232|  1.44k|    lh->num_nodes++;
  233|  1.44k|    n1 = &(lh->b[p]);
  234|  1.44k|    n2 = &(lh->b[p + pmax]);
  235|  1.44k|    *n2 = NULL;
  236|       |
  237|  6.54k|    for (np = *n1; np != NULL;) {
  ------------------
  |  Branch (237:20): [True: 5.10k, False: 1.44k]
  ------------------
  238|  5.10k|        hash = np->hash;
  239|  5.10k|        if ((hash % nni) != p) { /* move it */
  ------------------
  |  Branch (239:13): [True: 794, False: 4.31k]
  ------------------
  240|    794|            *n1 = (*n1)->next;
  241|    794|            np->next = *n2;
  242|    794|            *n2 = np;
  243|    794|        } else
  244|  4.31k|            n1 = &((*n1)->next);
  245|  5.10k|        np = *n1;
  246|  5.10k|    }
  247|       |
  248|  1.44k|    return 1;
  249|  1.44k|}
lhash.c:getrn:
  286|  8.63k|{
  287|  8.63k|    OPENSSL_LH_NODE **ret, *n1;
  288|  8.63k|    unsigned long hash, nn;
  289|  8.63k|    OPENSSL_LH_COMPFUNC cf;
  290|       |
  291|  8.63k|    hash = (*(lh->hash)) (data);
  292|  8.63k|    *rhash = hash;
  293|       |
  294|  8.63k|    nn = hash % lh->pmax;
  295|  8.63k|    if (nn < lh->p)
  ------------------
  |  Branch (295:9): [True: 3.85k, False: 4.77k]
  ------------------
  296|  3.85k|        nn = hash % lh->num_alloc_nodes;
  297|       |
  298|  8.63k|    cf = lh->comp;
  299|  8.63k|    ret = &(lh->b[(int)nn]);
  300|  21.6k|    for (n1 = *ret; n1 != NULL; n1 = n1->next) {
  ------------------
  |  Branch (300:21): [True: 18.5k, False: 3.05k]
  ------------------
  301|  18.5k|        if (n1->hash != hash) {
  ------------------
  |  Branch (301:13): [True: 12.6k, False: 5.87k]
  ------------------
  302|  12.6k|            ret = &(n1->next);
  303|  12.6k|            continue;
  304|  12.6k|        }
  305|  5.87k|        if (cf(n1->data, data) == 0)
  ------------------
  |  Branch (305:13): [True: 5.57k, False: 292]
  ------------------
  306|  5.57k|            break;
  307|    292|        ret = &(n1->next);
  308|    292|    }
  309|  8.63k|    return ret;
  310|  8.63k|}

CRYPTO_malloc:
  172|  3.62k|{
  173|  3.62k|    void *ptr;
  174|       |
  175|  3.62k|    INCREMENT(malloc_count);
  176|  3.62k|    if (malloc_impl != CRYPTO_malloc) {
  ------------------
  |  Branch (176:9): [True: 0, False: 3.62k]
  ------------------
  177|      0|        ptr = malloc_impl(num, file, line);
  178|      0|        if (ptr != NULL || num == 0)
  ------------------
  |  Branch (178:13): [True: 0, False: 0]
  |  Branch (178:28): [True: 0, False: 0]
  ------------------
  179|      0|            return ptr;
  180|      0|        goto err;
  181|      0|    }
  182|       |
  183|  3.62k|    if (num == 0)
  ------------------
  |  Branch (183:9): [True: 0, False: 3.62k]
  ------------------
  184|      0|        return NULL;
  185|       |
  186|  3.62k|    FAILTEST();
  187|  3.62k|    if (allow_customize) {
  ------------------
  |  Branch (187:9): [True: 2, False: 3.62k]
  ------------------
  188|       |        /*
  189|       |         * Disallow customization after the first allocation. We only set this
  190|       |         * if necessary to avoid a store to the same cache line on every
  191|       |         * allocation.
  192|       |         */
  193|      2|        allow_customize = 0;
  194|      2|    }
  195|       |
  196|  3.62k|    ptr = malloc(num);
  197|  3.62k|    if (ptr != NULL)
  ------------------
  |  Branch (197:9): [True: 3.62k, False: 0]
  ------------------
  198|  3.62k|        return ptr;
  199|      0| err:
  200|       |    /*
  201|       |     * ossl_err_get_state_int() in err.c uses CRYPTO_zalloc(num, NULL, 0) for
  202|       |     * ERR_STATE allocation. Prevent mem alloc error loop while reporting error.
  203|       |     */
  204|      0|    if (file != NULL || line != 0) {
  ------------------
  |  Branch (204:9): [True: 0, False: 0]
  |  Branch (204:25): [True: 0, False: 0]
  ------------------
  205|      0|        ERR_new();
  206|      0|        ERR_set_debug(file, line, NULL);
  207|      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
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  208|      0|    }
  209|      0|    return NULL;
  210|  3.62k|}
CRYPTO_zalloc:
  213|    708|{
  214|    708|    void *ret;
  215|       |
  216|    708|    ret = CRYPTO_malloc(num, file, line);
  217|    708|    if (ret != NULL)
  ------------------
  |  Branch (217:9): [True: 708, False: 0]
  ------------------
  218|    708|        memset(ret, 0, num);
  219|       |
  220|    708|    return ret;
  221|    708|}
CRYPTO_realloc:
  224|     12|{
  225|     12|    INCREMENT(realloc_count);
  226|     12|    if (realloc_impl != CRYPTO_realloc)
  ------------------
  |  Branch (226:9): [True: 0, False: 12]
  ------------------
  227|      0|        return realloc_impl(str, num, file, line);
  228|       |
  229|     12|    if (str == NULL)
  ------------------
  |  Branch (229:9): [True: 0, False: 12]
  ------------------
  230|      0|        return CRYPTO_malloc(num, file, line);
  231|       |
  232|     12|    if (num == 0) {
  ------------------
  |  Branch (232:9): [True: 0, False: 12]
  ------------------
  233|      0|        CRYPTO_free(str, file, line);
  234|      0|        return NULL;
  235|      0|    }
  236|       |
  237|     12|    FAILTEST();
  238|     12|    return realloc(str, num);
  239|     12|}
CRYPTO_free:
  269|  89.1k|{
  270|  89.1k|    INCREMENT(free_count);
  271|  89.1k|    if (free_impl != CRYPTO_free) {
  ------------------
  |  Branch (271:9): [True: 0, False: 89.1k]
  ------------------
  272|      0|        free_impl(str, file, line);
  273|      0|        return;
  274|      0|    }
  275|       |
  276|  89.1k|    free(str);
  277|  89.1k|}
CRYPTO_clear_free:
  280|    664|{
  281|    664|    if (str == NULL)
  ------------------
  |  Branch (281:9): [True: 0, False: 664]
  ------------------
  282|      0|        return;
  283|    664|    if (num)
  ------------------
  |  Branch (283:9): [True: 664, False: 0]
  ------------------
  284|    664|        OPENSSL_cleanse(str, num);
  285|    664|    CRYPTO_free(str, file, line);
  286|    664|}

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:
  595|      2|{
  596|      2|    OPENSSL_free(sh.freelist);
  ------------------
  |  |  107|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  597|      2|    OPENSSL_free(sh.bittable);
  ------------------
  |  |  107|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  598|      2|    OPENSSL_free(sh.bitmalloc);
  ------------------
  |  |  107|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  599|      2|#if !defined(_WIN32)
  600|      2|    if (sh.map_result != MAP_FAILED && sh.map_size)
  ------------------
  |  Branch (600:9): [True: 2, False: 0]
  |  Branch (600:40): [True: 0, False: 2]
  ------------------
  601|      0|        munmap(sh.map_result, sh.map_size);
  602|       |#else
  603|       |    if (sh.map_result != NULL && sh.map_size)
  604|       |        VirtualFree(sh.map_result, 0, MEM_RELEASE);
  605|       |#endif
  606|      2|    memset(&sh, 0, sizeof(sh));
  607|      2|}

OBJ_NAME_cleanup:
  368|      8|{
  369|      8|    unsigned long down_load;
  370|       |
  371|      8|    if (names_lh == NULL)
  ------------------
  |  Branch (371:9): [True: 8, False: 0]
  ------------------
  372|      8|        return;
  373|       |
  374|      0|    free_type = type;
  375|      0|    down_load = lh_OBJ_NAME_get_down_load(names_lh);
  376|      0|    lh_OBJ_NAME_set_down_load(names_lh, 0);
  377|       |
  378|      0|    lh_OBJ_NAME_doall(names_lh, names_lh_free_doall);
  379|      0|    if (type < 0) {
  ------------------
  |  Branch (379:9): [True: 0, False: 0]
  ------------------
  380|      0|        lh_OBJ_NAME_free(names_lh);
  381|      0|        sk_NAME_FUNCS_pop_free(name_funcs_stack, name_funcs_free);
  382|      0|        CRYPTO_THREAD_lock_free(obj_lock);
  383|      0|        names_lh = NULL;
  384|      0|        name_funcs_stack = NULL;
  385|      0|        obj_lock = NULL;
  386|      0|    } else
  387|      0|        lh_OBJ_NAME_set_down_load(names_lh, down_load);
  388|      0|}

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_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_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_err_load_RAND_strings:
  101|      2|{
  102|      2|#ifndef OPENSSL_NO_ERR
  103|      2|    if (ERR_reason_error_string(RAND_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (103:9): [True: 2, False: 0]
  ------------------
  104|      2|        ERR_load_strings_const(RAND_str_reasons);
  105|      2|#endif
  106|      2|    return 1;
  107|      2|}

ossl_rand_cleanup_int:
   80|      2|{
   81|      2|# ifndef OPENSSL_NO_DEPRECATED_3_0
   82|      2|    const RAND_METHOD *meth = default_RAND_meth;
   83|       |
   84|      2|    if (!rand_inited)
  ------------------
  |  Branch (84:9): [True: 2, False: 0]
  ------------------
   85|      2|        return;
   86|       |
   87|      0|    if (meth != NULL && meth->cleanup != NULL)
  ------------------
  |  Branch (87:9): [True: 0, False: 0]
  |  Branch (87:25): [True: 0, False: 0]
  ------------------
   88|      0|        meth->cleanup();
   89|      0|    RAND_set_rand_method(NULL);
   90|      0|# endif
   91|      0|    ossl_rand_pool_cleanup();
   92|      0|# ifndef OPENSSL_NO_ENGINE
   93|      0|    CRYPTO_THREAD_lock_free(rand_engine_lock);
   94|      0|    rand_engine_lock = NULL;
   95|      0|# endif
   96|      0|# ifndef OPENSSL_NO_DEPRECATED_3_0
   97|      0|    CRYPTO_THREAD_lock_free(rand_meth_lock);
   98|      0|    rand_meth_lock = NULL;
   99|      0|# endif
  100|      0|    ossl_release_default_drbg_ctx();
  101|      0|    rand_inited = 0;
  102|      0|}

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|}

OPENSSL_sk_new_null:
  131|      2|{
  132|      2|    return OPENSSL_sk_new_reserve(NULL, 0);
  133|      2|}
OPENSSL_sk_new_reserve:
  227|      2|{
  228|      2|    OPENSSL_STACK *st = OPENSSL_zalloc(sizeof(OPENSSL_STACK));
  ------------------
  |  |   99|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  229|       |
  230|      2|    if (st == NULL)
  ------------------
  |  Branch (230:9): [True: 0, False: 2]
  ------------------
  231|      0|        return NULL;
  232|       |
  233|      2|    st->comp = c;
  234|       |
  235|      2|    if (n <= 0)
  ------------------
  |  Branch (235:9): [True: 2, False: 0]
  ------------------
  236|      2|        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|      2|{
  260|      2|    if (st == NULL) {
  ------------------
  |  Branch (260:9): [True: 0, False: 2]
  ------------------
  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),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  300|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  262|      0|        return 0;
  263|      0|    }
  264|      2|    if (st->num == max_nodes) {
  ------------------
  |  Branch (264:9): [True: 0, False: 2]
  ------------------
  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),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  300|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  266|      0|        return 0;
  267|      0|    }
  268|       |
  269|      2|    if (!sk_reserve(st, 1, 0))
  ------------------
  |  Branch (269:9): [True: 0, False: 2]
  ------------------
  270|      0|        return 0;
  271|       |
  272|      2|    if ((loc >= st->num) || (loc < 0)) {
  ------------------
  |  Branch (272:9): [True: 2, False: 0]
  |  Branch (272:29): [True: 0, False: 0]
  ------------------
  273|      2|        st->data[st->num] = data;
  274|      2|    } 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|      2|    st->num++;
  280|      2|    st->sorted = 0;
  281|      2|    return st->num;
  282|      2|}
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_push:
  398|      2|{
  399|      2|    if (st == NULL)
  ------------------
  |  Branch (399:9): [True: 0, False: 2]
  ------------------
  400|      0|        return -1;
  401|      2|    return OPENSSL_sk_insert(st, data, st->num);
  402|      2|}
OPENSSL_sk_pop_free:
  432|      4|{
  433|      4|    int i;
  434|       |
  435|      4|    if (st == NULL)
  ------------------
  |  Branch (435:9): [True: 4, False: 0]
  ------------------
  436|      4|        return;
  437|      0|    for (i = 0; i < st->num; i++)
  ------------------
  |  Branch (437:17): [True: 0, False: 0]
  ------------------
  438|      0|        if (st->data[i] != NULL)
  ------------------
  |  Branch (438:13): [True: 0, False: 0]
  ------------------
  439|      0|            func((char *)st->data[i]);
  440|      0|    OPENSSL_sk_free(st);
  441|      0|}
OPENSSL_sk_free:
  444|     10|{
  445|     10|    if (st == NULL)
  ------------------
  |  Branch (445:9): [True: 8, False: 2]
  ------------------
  446|      8|        return;
  447|      2|    OPENSSL_free(st->data);
  ------------------
  |  |  107|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  448|      2|    OPENSSL_free(st);
  ------------------
  |  |  107|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  449|      2|}
OPENSSL_sk_num:
  452|     10|{
  453|     10|    return st == NULL ? -1 : st->num;
  ------------------
  |  Branch (453:12): [True: 6, False: 4]
  ------------------
  454|     10|}
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|}
stack.c:sk_reserve:
  178|      2|{
  179|      2|    const void **tmpdata;
  180|      2|    int num_alloc;
  181|       |
  182|       |    /* Check to see the reservation isn't exceeding the hard limit */
  183|      2|    if (n > max_nodes - st->num) {
  ------------------
  |  Branch (183:9): [True: 0, False: 2]
  ------------------
  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),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  300|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  185|      0|        return 0;
  186|      0|    }
  187|       |
  188|       |    /* Figure out the new size */
  189|      2|    num_alloc = st->num + n;
  190|      2|    if (num_alloc < min_nodes)
  ------------------
  |  Branch (190:9): [True: 2, False: 0]
  ------------------
  191|      2|        num_alloc = min_nodes;
  192|       |
  193|       |    /* If |st->data| allocation was postponed */
  194|      2|    if (st->data == NULL) {
  ------------------
  |  Branch (194:9): [True: 2, False: 0]
  ------------------
  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|      2|        if ((st->data = OPENSSL_zalloc(sizeof(void *) * num_alloc)) == NULL)
  ------------------
  |  |   99|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      2|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      2|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (199:13): [True: 0, False: 2]
  ------------------
  200|      0|            return 0;
  201|      2|        st->num_alloc = num_alloc;
  202|      2|        return 1;
  203|      2|    }
  204|       |
  205|      0|    if (!exact) {
  ------------------
  |  Branch (205:9): [True: 0, False: 0]
  ------------------
  206|      0|        if (num_alloc <= st->num_alloc)
  ------------------
  |  Branch (206:13): [True: 0, False: 0]
  ------------------
  207|      0|            return 1;
  208|      0|        num_alloc = compute_growth(num_alloc, st->num_alloc);
  209|      0|        if (num_alloc == 0) {
  ------------------
  |  Branch (209:13): [True: 0, False: 0]
  ------------------
  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),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                    ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC),     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  300|      0|#    define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  405|      0|     ERR_set_error)
  |  |  ------------------
  ------------------
  211|      0|            return 0;
  212|      0|        }
  213|      0|    } else if (num_alloc == st->num_alloc) {
  ------------------
  |  Branch (213:16): [True: 0, False: 0]
  ------------------
  214|      0|        return 1;
  215|      0|    }
  216|       |
  217|      0|    tmpdata = OPENSSL_realloc((void *)st->data, sizeof(void *) * num_alloc);
  ------------------
  |  |  101|      0|        CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  218|      0|    if (tmpdata == NULL)
  ------------------
  |  Branch (218:9): [True: 0, False: 0]
  ------------------
  219|      0|        return 0;
  220|       |
  221|      0|    st->data = tmpdata;
  222|      0|    st->num_alloc = num_alloc;
  223|      0|    return 1;
  224|      0|}
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|}

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_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|}

CRYPTO_THREAD_lock_new:
   46|     10|{
   47|     10|# ifdef USE_RWLOCK
   48|     10|    CRYPTO_RWLOCK *lock;
   49|       |
   50|     10|    if ((lock = CRYPTO_zalloc(sizeof(pthread_rwlock_t), NULL, 0)) == NULL)
  ------------------
  |  Branch (50:9): [True: 0, False: 10]
  ------------------
   51|       |        /* Don't set error, to avoid recursion blowup. */
   52|      0|        return NULL;
   53|       |
   54|     10|    if (pthread_rwlock_init(lock, NULL) != 0) {
  ------------------
  |  Branch (54:9): [True: 0, False: 10]
  ------------------
   55|      0|        OPENSSL_free(lock);
  ------------------
  |  |  107|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   56|      0|        return NULL;
   57|      0|    }
   58|       |# else
   59|       |    pthread_mutexattr_t attr;
   60|       |    CRYPTO_RWLOCK *lock;
   61|       |
   62|       |    if ((lock = CRYPTO_zalloc(sizeof(pthread_mutex_t), NULL, 0)) == NULL)
   63|       |        /* Don't set error, to avoid recursion blowup. */
   64|       |        return NULL;
   65|       |
   66|       |    /*
   67|       |     * We don't use recursive mutexes, but try to catch errors if we do.
   68|       |     */
   69|       |    pthread_mutexattr_init(&attr);
   70|       |#  if !defined (__TANDEM) && !defined (_SPT_MODEL_)
   71|       |#   if !defined(NDEBUG) && !defined(OPENSSL_NO_MUTEX_ERRORCHECK)
   72|       |    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
   73|       |#   endif
   74|       |#  else
   75|       |    /* The SPT Thread Library does not define MUTEX attributes. */
   76|       |#  endif
   77|       |
   78|       |    if (pthread_mutex_init(lock, &attr) != 0) {
   79|       |        pthread_mutexattr_destroy(&attr);
   80|       |        OPENSSL_free(lock);
   81|       |        return NULL;
   82|       |    }
   83|       |
   84|       |    pthread_mutexattr_destroy(&attr);
   85|       |# endif
   86|       |
   87|     10|    return lock;
   88|     10|}
CRYPTO_THREAD_read_lock:
   91|    136|{
   92|    136|# ifdef USE_RWLOCK
   93|    136|    if (pthread_rwlock_rdlock(lock) != 0)
  ------------------
  |  Branch (93:9): [True: 0, False: 136]
  ------------------
   94|      0|        return 0;
   95|       |# else
   96|       |    if (pthread_mutex_lock(lock) != 0) {
   97|       |        assert(errno != EDEADLK && errno != EBUSY);
   98|       |        return 0;
   99|       |    }
  100|       |# endif
  101|       |
  102|    136|    return 1;
  103|    136|}
CRYPTO_THREAD_write_lock:
  106|    218|{
  107|    218|# ifdef USE_RWLOCK
  108|    218|    if (pthread_rwlock_wrlock(lock) != 0)
  ------------------
  |  Branch (108:9): [True: 0, False: 218]
  ------------------
  109|      0|        return 0;
  110|       |# else
  111|       |    if (pthread_mutex_lock(lock) != 0) {
  112|       |        assert(errno != EDEADLK && errno != EBUSY);
  113|       |        return 0;
  114|       |    }
  115|       |# endif
  116|       |
  117|    218|    return 1;
  118|    218|}
CRYPTO_THREAD_unlock:
  121|    354|{
  122|    354|# ifdef USE_RWLOCK
  123|    354|    if (pthread_rwlock_unlock(lock) != 0)
  ------------------
  |  Branch (123:9): [True: 0, False: 354]
  ------------------
  124|      0|        return 0;
  125|       |# else
  126|       |    if (pthread_mutex_unlock(lock) != 0) {
  127|       |        assert(errno != EPERM);
  128|       |        return 0;
  129|       |    }
  130|       |# endif
  131|       |
  132|    354|    return 1;
  133|    354|}
CRYPTO_THREAD_lock_free:
  136|     22|{
  137|     22|    if (lock == NULL)
  ------------------
  |  Branch (137:9): [True: 12, False: 10]
  ------------------
  138|     12|        return;
  139|       |
  140|     10|# ifdef USE_RWLOCK
  141|     10|    pthread_rwlock_destroy(lock);
  142|       |# else
  143|       |    pthread_mutex_destroy(lock);
  144|       |# endif
  145|     10|    OPENSSL_free(lock);
  ------------------
  |  |  107|     10|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  279|     10|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  280|     10|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  146|       |
  147|     10|    return;
  148|     22|}
CRYPTO_THREAD_run_once:
  151|  5.50k|{
  152|  5.50k|    if (pthread_once(once, init) != 0)
  ------------------
  |  Branch (152:9): [True: 0, False: 5.50k]
  ------------------
  153|      0|        return 0;
  154|       |
  155|  5.50k|    return 1;
  156|  5.50k|}
CRYPTO_THREAD_init_local:
  159|      6|{
  160|      6|    if (pthread_key_create(key, cleanup) != 0)
  ------------------
  |  Branch (160:9): [True: 0, False: 6]
  ------------------
  161|      0|        return 0;
  162|       |
  163|      6|    return 1;
  164|      6|}
CRYPTO_THREAD_get_local:
  167|  2.68k|{
  168|  2.68k|    return pthread_getspecific(*key);
  169|  2.68k|}
CRYPTO_THREAD_set_local:
  172|     14|{
  173|     14|    if (pthread_setspecific(*key, val) != 0)
  ------------------
  |  Branch (173:9): [True: 0, False: 14]
  ------------------
  174|      0|        return 0;
  175|       |
  176|     14|    return 1;
  177|     14|}
CRYPTO_THREAD_cleanup_local:
  180|      6|{
  181|      6|    if (pthread_key_delete(*key) != 0)
  ------------------
  |  Branch (181:9): [True: 0, False: 6]
  ------------------
  182|      0|        return 0;
  183|       |
  184|      6|    return 1;
  185|      6|}
CRYPTO_atomic_or:
  225|      2|{
  226|      2|# if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
  227|      2|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (227:9): [Folded - Ignored]
  ------------------
  228|      2|        *ret = __atomic_or_fetch(val, op, __ATOMIC_ACQ_REL);
  229|      2|        return 1;
  230|      2|    }
  231|       |# elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
  232|       |    /* This will work for all future Solaris versions. */
  233|       |    if (ret != NULL) {
  234|       |        *ret = atomic_or_64_nv(val, op);
  235|       |        return 1;
  236|       |    }
  237|       |# endif
  238|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (238:9): [True: 0, False: 0]
  |  Branch (238:25): [True: 0, False: 0]
  ------------------
  239|      0|        return 0;
  240|      0|    *val |= op;
  241|      0|    *ret  = *val;
  242|       |
  243|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (243:9): [True: 0, False: 0]
  ------------------
  244|      0|        return 0;
  245|       |
  246|      0|    return 1;
  247|      0|}
CRYPTO_atomic_load:
  250|  2.68k|{
  251|  2.68k|# if defined(__GNUC__) && defined(__ATOMIC_ACQUIRE) && !defined(BROKEN_CLANG_ATOMICS)
  252|  2.68k|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (252:9): [Folded - Ignored]
  ------------------
  253|  2.68k|        __atomic_load(val, ret, __ATOMIC_ACQUIRE);
  254|  2.68k|        return 1;
  255|  2.68k|    }
  256|       |# elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
  257|       |    /* This will work for all future Solaris versions. */
  258|       |    if (ret != NULL) {
  259|       |        *ret = atomic_or_64_nv(val, 0);
  260|       |        return 1;
  261|       |    }
  262|       |# endif
  263|      0|    if (lock == NULL || !CRYPTO_THREAD_read_lock(lock))
  ------------------
  |  Branch (263:9): [True: 0, False: 0]
  |  Branch (263:25): [True: 0, False: 0]
  ------------------
  264|      0|        return 0;
  265|      0|    *ret  = *val;
  266|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (266:9): [True: 0, False: 0]
  ------------------
  267|      0|        return 0;
  268|       |
  269|      0|    return 1;
  270|      0|}

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|}

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

FuzzerInitialize:
   32|      2|{
   33|      2|    b1 = BN_new();
   34|      2|    b2 = BN_new();
   35|      2|    b3 = BN_new();
   36|      2|    b4 = BN_new();
   37|      2|    b5 = BN_new();
   38|      2|    ctx = BN_CTX_new();
   39|       |
   40|      2|    OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
  ------------------
  |  |  450|      2|# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS    0x00000002L
  ------------------
   41|      2|    ERR_clear_error();
   42|       |
   43|      2|    return 1;
   44|      2|}
FuzzerTestOneInput:
   47|  2.67k|{
   48|  2.67k|    int success = 0;
   49|  2.67k|    size_t l1 = 0, l2 = 0;
   50|       |    /* s1 and s2 will be the signs for b1 and b2. */
   51|  2.67k|    int s1 = 0, s2 = 0;
   52|       |
   53|       |    /* limit the size of the input to avoid timeout */
   54|  2.67k|    if (len > MAX_LEN)
  ------------------
  |  |   22|  2.67k|#define MAX_LEN (256 * 1000)
  ------------------
  |  Branch (54:9): [True: 1, False: 2.66k]
  ------------------
   55|      1|        len = MAX_LEN;
  ------------------
  |  |   22|      1|#define MAX_LEN (256 * 1000)
  ------------------
   56|       |
   57|       |    /* We are going to split the buffer in two, sizes l1 and l2, giving b1 and
   58|       |     * b2.
   59|       |     */
   60|  2.67k|    if (len > 0) {
  ------------------
  |  Branch (60:9): [True: 2.67k, False: 0]
  ------------------
   61|  2.67k|        --len;
   62|       |        /* Use first byte to divide the remaining buffer into 3Fths. I admit
   63|       |         * this disallows some number sizes. If it matters, better ideas are
   64|       |         * welcome (Ben).
   65|       |         */
   66|  2.67k|        l1 = ((buf[0] & 0x3f) * len) / 0x3f;
   67|  2.67k|        s1 = buf[0] & 0x40;
   68|  2.67k|        s2 = buf[0] & 0x80;
   69|  2.67k|        ++buf;
   70|  2.67k|        l2 = len - l1;
   71|  2.67k|    }
   72|  2.67k|    OPENSSL_assert(BN_bin2bn(buf, l1, b1) == b1);
  ------------------
  |  |  421|  2.67k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (421:12): [True: 2.67k, False: 0]
  |  |  ------------------
  ------------------
   73|  2.67k|    BN_set_negative(b1, s1);
   74|  2.67k|    OPENSSL_assert(BN_bin2bn(buf + l1, l2, b2) == b2);
  ------------------
  |  |  421|  2.67k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (421:12): [True: 2.67k, False: 0]
  |  |  ------------------
  ------------------
   75|  2.67k|    BN_set_negative(b2, s2);
   76|       |
   77|       |    /* divide by 0 is an error */
   78|  2.67k|    if (BN_is_zero(b2)) {
  ------------------
  |  Branch (78:9): [True: 22, False: 2.64k]
  ------------------
   79|     22|        success = 1;
   80|     22|        goto done;
   81|     22|    }
   82|       |
   83|  2.64k|    OPENSSL_assert(BN_div(b3, b4, b1, b2, ctx));
  ------------------
  |  |  421|  2.64k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (421:12): [True: 2.64k, False: 0]
  |  |  ------------------
  ------------------
   84|  2.64k|    if (BN_is_zero(b1))
  ------------------
  |  Branch (84:9): [True: 315, False: 2.33k]
  ------------------
   85|    315|        success = BN_is_zero(b3) && BN_is_zero(b4);
  ------------------
  |  Branch (85:19): [True: 315, False: 0]
  |  Branch (85:37): [True: 315, False: 0]
  ------------------
   86|  2.33k|    else if (BN_is_negative(b1))
  ------------------
  |  Branch (86:14): [True: 1.63k, False: 697]
  ------------------
   87|  1.63k|        success = (BN_is_negative(b3) != BN_is_negative(b2) || BN_is_zero(b3))
  ------------------
  |  Branch (87:20): [True: 1.53k, False: 98]
  |  Branch (87:64): [True: 98, False: 0]
  ------------------
   88|  1.63k|            && (BN_is_negative(b4) || BN_is_zero(b4));
  ------------------
  |  Branch (88:17): [True: 1.44k, False: 192]
  |  Branch (88:39): [True: 192, False: 0]
  ------------------
   89|    697|    else
   90|    697|        success = (BN_is_negative(b3) == BN_is_negative(b2)  || BN_is_zero(b3))
  ------------------
  |  Branch (90:20): [True: 681, False: 16]
  |  Branch (90:65): [True: 16, False: 0]
  ------------------
   91|    697|            && (!BN_is_negative(b4) || BN_is_zero(b4));
  ------------------
  |  Branch (91:17): [True: 697, False: 0]
  |  Branch (91:40): [True: 0, False: 0]
  ------------------
   92|  2.64k|    OPENSSL_assert(BN_mul(b5, b3, b2, ctx));
  ------------------
  |  |  421|  2.64k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (421:12): [True: 2.64k, False: 0]
  |  |  ------------------
  ------------------
   93|  2.64k|    OPENSSL_assert(BN_add(b5, b5, b4));
  ------------------
  |  |  421|  2.64k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (421:12): [True: 2.64k, False: 0]
  |  |  ------------------
  ------------------
   94|       |
   95|  2.64k|    success = success && BN_cmp(b5, b1) == 0;
  ------------------
  |  Branch (95:15): [True: 2.64k, False: 0]
  |  Branch (95:26): [True: 2.64k, False: 0]
  ------------------
   96|  2.64k|    if (!success) {
  ------------------
  |  Branch (96:9): [True: 0, False: 2.64k]
  ------------------
   97|      0|        BN_print_fp(stdout, b1);
   98|      0|        putchar('\n');
   99|      0|        BN_print_fp(stdout, b2);
  100|      0|        putchar('\n');
  101|      0|        BN_print_fp(stdout, b3);
  102|      0|        putchar('\n');
  103|      0|        BN_print_fp(stdout, b4);
  104|      0|        putchar('\n');
  105|      0|        BN_print_fp(stdout, b5);
  106|      0|        putchar('\n');
  107|      0|        printf("%d %d %d %d %d %d %d\n", BN_is_negative(b1),
  108|      0|               BN_is_negative(b2),
  109|      0|               BN_is_negative(b3), BN_is_negative(b4), BN_is_zero(b4),
  110|      0|               BN_is_negative(b3) != BN_is_negative(b2)
  ------------------
  |  Branch (110:16): [True: 0, False: 0]
  ------------------
  111|      0|               && (BN_is_negative(b4) || BN_is_zero(b4)),
  ------------------
  |  Branch (111:20): [True: 0, False: 0]
  |  Branch (111:42): [True: 0, False: 0]
  ------------------
  112|      0|               BN_cmp(b5, b1));
  113|      0|        puts("----\n");
  114|      0|    }
  115|       |
  116|  2.67k| done:
  117|  2.67k|    OPENSSL_assert(success);
  ------------------
  |  |  421|  2.67k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  279|      0|#   define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  280|      0|#   define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (421:12): [True: 2.67k, False: 0]
  |  |  ------------------
  ------------------
  118|  2.67k|    ERR_clear_error();
  119|       |
  120|  2.67k|    return 0;
  121|  2.64k|}

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

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|}

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

err.c:ossl_check_ERR_STRING_DATA_lh_type:
  162|  8.63k|    { \
  163|  8.63k|        return (OPENSSL_LHASH *)lh; \
  164|  8.63k|    } \
err.c:ossl_check_ERR_STRING_DATA_lh_hashfunc_type:
  172|      2|    { \
  173|      2|        return (OPENSSL_LH_HASHFUNC)hfn; \
  174|      2|    } \
err.c:ossl_check_ERR_STRING_DATA_lh_compfunc_type:
  167|      2|    { \
  168|      2|        return (OPENSSL_LH_COMPFUNC)cmp; \
  169|      2|    } \
err.c:ossl_check_ERR_STRING_DATA_lh_plain_type:
  147|  8.49k|    { \
  148|  8.49k|        return ptr; \
  149|  8.49k|    } \
err.c:ossl_check_const_ERR_STRING_DATA_lh_plain_type:
  152|    136|    { \
  153|    136|        return ptr; \
  154|    136|    } \
store_register.c:lh_OSSL_STORE_LOADER_free:
  216|      2|    { \
  217|      2|        OPENSSL_LH_free((OPENSSL_LHASH *)lh); \
  218|      2|    } \

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|    } \
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|      2|    { \
   95|      2|        OPENSSL_sk_free((OPENSSL_STACK *)sk); \
   96|      2|    } \
conf_mod.c:sk_CONF_IMODULE_num:
   70|      2|    { \
   71|      2|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk); \
   72|      2|    } \
conf_mod.c:sk_CONF_IMODULE_free:
   94|      4|    { \
   95|      4|        OPENSSL_sk_free((OPENSSL_STACK *)sk); \
   96|      4|    } \
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|    } \
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|    } \

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|}

