ERR_load_ASN1_strings:
  344|      2|{
  345|      2|#ifndef OPENSSL_NO_ERR
  346|      2|    if (ERR_func_error_string(ASN1_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (346:9): [True: 2, False: 0]
  ------------------
  347|      2|        ERR_load_strings_const(ASN1_str_functs);
  348|      2|        ERR_load_strings_const(ASN1_str_reasons);
  349|      2|    }
  350|      2|#endif
  351|      2|    return 1;
  352|      2|}

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

bio_sock_cleanup_int:
  152|      2|{
  153|       |# ifdef OPENSSL_SYS_WINDOWS
  154|       |    if (wsa_init_done) {
  155|       |        wsa_init_done = 0;
  156|       |        WSACleanup();
  157|       |    }
  158|       |# endif
  159|      2|}

ERR_load_BIO_strings:
  137|      2|{
  138|      2|#ifndef OPENSSL_NO_ERR
  139|      2|    if (ERR_func_error_string(BIO_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (139:9): [True: 2, False: 0]
  ------------------
  140|      2|        ERR_load_strings_const(BIO_str_functs);
  141|      2|        ERR_load_strings_const(BIO_str_reasons);
  142|      2|    }
  143|      2|#endif
  144|      2|    return 1;
  145|      2|}

bio_cleanup:
  778|      2|{
  779|      2|#ifndef OPENSSL_NO_SOCK
  780|      2|    bio_sock_cleanup_int();
  781|      2|    CRYPTO_THREAD_lock_free(bio_lookup_lock);
  782|      2|    bio_lookup_lock = NULL;
  783|      2|#endif
  784|      2|    CRYPTO_THREAD_lock_free(bio_type_lock);
  785|      2|    bio_type_lock = NULL;
  786|      2|}

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

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

BN_CTX_new:
  135|      2|{
  136|      2|    BN_CTX *ret;
  137|       |
  138|      2|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
  ------------------
  |  |  120|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      2|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      2|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (138:9): [True: 0, False: 2]
  ------------------
  139|      0|        BNerr(BN_F_BN_CTX_NEW, ERR_R_MALLOC_FAILURE);
  ------------------
  |  |  102|      0|# define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |   29|      0|#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
  |  |  ------------------
  ------------------
  140|      0|        return NULL;
  141|      0|    }
  142|       |    /* Initialise the structure */
  143|      2|    BN_POOL_init(&ret->pool);
  144|      2|    BN_STACK_init(&ret->stack);
  145|      2|    return ret;
  146|      2|}
BN_CTX_start:
  182|  4.94k|{
  183|  4.94k|    CTXDBG_ENTRY("BN_CTX_start", ctx);
  184|       |    /* If we're already overflowing ... */
  185|  4.94k|    if (ctx->err_stack || ctx->too_many)
  ------------------
  |  Branch (185:9): [True: 0, False: 4.94k]
  |  Branch (185:27): [True: 0, False: 4.94k]
  ------------------
  186|      0|        ctx->err_stack++;
  187|       |    /* (Try to) get a new frame pointer */
  188|  4.94k|    else if (!BN_STACK_push(&ctx->stack, ctx->used)) {
  ------------------
  |  Branch (188:14): [True: 0, False: 4.94k]
  ------------------
  189|      0|        BNerr(BN_F_BN_CTX_START, BN_R_TOO_MANY_TEMPORARY_VARIABLES);
  ------------------
  |  |  102|      0|# define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |   29|      0|#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
  |  |  ------------------
  ------------------
  190|      0|        ctx->err_stack++;
  191|      0|    }
  192|  4.94k|    CTXDBG_EXIT(ctx);
  193|  4.94k|}
BN_CTX_end:
  196|  4.94k|{
  197|  4.94k|    if (ctx == NULL)
  ------------------
  |  Branch (197:9): [True: 0, False: 4.94k]
  ------------------
  198|      0|        return;
  199|  4.94k|    CTXDBG_ENTRY("BN_CTX_end", ctx);
  200|  4.94k|    if (ctx->err_stack)
  ------------------
  |  Branch (200:9): [True: 0, False: 4.94k]
  ------------------
  201|      0|        ctx->err_stack--;
  202|  4.94k|    else {
  203|  4.94k|        unsigned int fp = BN_STACK_pop(&ctx->stack);
  204|       |        /* Does this stack frame have anything to release? */
  205|  4.94k|        if (fp < ctx->used)
  ------------------
  |  Branch (205:13): [True: 3.81k, False: 1.12k]
  ------------------
  206|  3.81k|            BN_POOL_release(&ctx->pool, ctx->used - fp);
  207|  4.94k|        ctx->used = fp;
  208|       |        /* Unjam "too_many" in case "get" had failed */
  209|  4.94k|        ctx->too_many = 0;
  210|  4.94k|    }
  211|  4.94k|    CTXDBG_EXIT(ctx);
  212|  4.94k|}
BN_CTX_get:
  215|  9.26k|{
  216|  9.26k|    BIGNUM *ret;
  217|       |
  218|  9.26k|    CTXDBG_ENTRY("BN_CTX_get", ctx);
  219|  9.26k|    if (ctx->err_stack || ctx->too_many)
  ------------------
  |  Branch (219:9): [True: 0, False: 9.26k]
  |  Branch (219:27): [True: 0, False: 9.26k]
  ------------------
  220|      0|        return NULL;
  221|  9.26k|    if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {
  ------------------
  |  Branch (221:9): [True: 0, False: 9.26k]
  ------------------
  222|       |        /*
  223|       |         * Setting too_many prevents repeated "get" attempts from cluttering
  224|       |         * the error stack.
  225|       |         */
  226|      0|        ctx->too_many = 1;
  227|      0|        BNerr(BN_F_BN_CTX_GET, BN_R_TOO_MANY_TEMPORARY_VARIABLES);
  ------------------
  |  |  102|      0|# define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |   29|      0|#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
  |  |  ------------------
  ------------------
  228|      0|        return NULL;
  229|      0|    }
  230|       |    /* OK, make sure the returned bignum is "zero" */
  231|  9.26k|    BN_zero(ret);
  ------------------
  |  |  196|  9.26k|#  define BN_zero(a)      (BN_set_word((a),0))
  ------------------
  232|       |    /* clear BN_FLG_CONSTTIME if leaked from previous frames */
  233|  9.26k|    ret->flags &= (~BN_FLG_CONSTTIME);
  ------------------
  |  |   61|  9.26k|# define BN_FLG_CONSTTIME        0x04
  ------------------
  234|  9.26k|    ctx->used++;
  235|  9.26k|    CTXDBG_RET(ctx, ret);
  236|  9.26k|    return ret;
  237|  9.26k|}
bn_ctx.c:BN_STACK_init:
  244|      2|{
  245|      2|    st->indexes = NULL;
  246|      2|    st->depth = st->size = 0;
  247|      2|}
bn_ctx.c:BN_STACK_push:
  257|  4.94k|{
  258|  4.94k|    if (st->depth == st->size) {
  ------------------
  |  Branch (258:9): [True: 1, False: 4.94k]
  ------------------
  259|       |        /* Need to expand */
  260|      1|        unsigned int newsize =
  261|      1|            st->size ? (st->size * 3 / 2) : BN_CTX_START_FRAMES;
  ------------------
  |  |   29|      1|#define BN_CTX_START_FRAMES     32
  ------------------
  |  Branch (261:13): [True: 0, False: 1]
  ------------------
  262|      1|        unsigned int *newitems;
  263|       |
  264|      1|        if ((newitems = OPENSSL_malloc(sizeof(*newitems) * newsize)) == NULL) {
  ------------------
  |  |  118|      1|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      1|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      1|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (264:13): [True: 0, False: 1]
  ------------------
  265|      0|            BNerr(BN_F_BN_STACK_PUSH, ERR_R_MALLOC_FAILURE);
  ------------------
  |  |  102|      0|# define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |   29|      0|#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
  |  |  ------------------
  ------------------
  266|      0|            return 0;
  267|      0|        }
  268|      1|        if (st->depth)
  ------------------
  |  Branch (268:13): [True: 0, False: 1]
  ------------------
  269|      0|            memcpy(newitems, st->indexes, sizeof(*newitems) * st->depth);
  270|      1|        OPENSSL_free(st->indexes);
  ------------------
  |  |  128|      1|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      1|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      1|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  271|      1|        st->indexes = newitems;
  272|      1|        st->size = newsize;
  273|      1|    }
  274|  4.94k|    st->indexes[(st->depth)++] = idx;
  275|  4.94k|    return 1;
  276|  4.94k|}
bn_ctx.c:BN_STACK_pop:
  279|  4.94k|{
  280|  4.94k|    return st->indexes[--(st->depth)];
  281|  4.94k|}
bn_ctx.c:BN_POOL_init:
  288|      2|{
  289|      2|    p->head = p->current = p->tail = NULL;
  290|      2|    p->used = p->size = 0;
  291|      2|}
bn_ctx.c:BN_POOL_get:
  310|  9.26k|{
  311|  9.26k|    BIGNUM *bn;
  312|  9.26k|    unsigned int loop;
  313|       |
  314|       |    /* Full; allocate a new pool item and link it in. */
  315|  9.26k|    if (p->used == p->size) {
  ------------------
  |  Branch (315:9): [True: 1, False: 9.26k]
  ------------------
  316|      1|        BN_POOL_ITEM *item;
  317|       |
  318|      1|        if ((item = OPENSSL_malloc(sizeof(*item))) == NULL) {
  ------------------
  |  |  118|      1|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      1|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      1|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (318:13): [True: 0, False: 1]
  ------------------
  319|      0|            BNerr(BN_F_BN_POOL_GET, ERR_R_MALLOC_FAILURE);
  ------------------
  |  |  102|      0|# define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |   29|      0|#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
  |  |  ------------------
  ------------------
  320|      0|            return NULL;
  321|      0|        }
  322|     17|        for (loop = 0, bn = item->vals; loop++ < BN_CTX_POOL_SIZE; bn++) {
  ------------------
  |  |   27|     17|#define BN_CTX_POOL_SIZE        16
  ------------------
  |  Branch (322:41): [True: 16, False: 1]
  ------------------
  323|     16|            bn_init(bn);
  324|     16|            if ((flag & BN_FLG_SECURE) != 0)
  ------------------
  |  |   62|     16|# define BN_FLG_SECURE           0x08
  ------------------
  |  Branch (324:17): [True: 0, False: 16]
  ------------------
  325|      0|                BN_set_flags(bn, BN_FLG_SECURE);
  ------------------
  |  |   62|      0|# define BN_FLG_SECURE           0x08
  ------------------
  326|     16|        }
  327|      1|        item->prev = p->tail;
  328|      1|        item->next = NULL;
  329|       |
  330|      1|        if (p->head == NULL)
  ------------------
  |  Branch (330:13): [True: 1, False: 0]
  ------------------
  331|      1|            p->head = p->current = p->tail = item;
  332|      0|        else {
  333|      0|            p->tail->next = item;
  334|      0|            p->tail = item;
  335|      0|            p->current = item;
  336|      0|        }
  337|      1|        p->size += BN_CTX_POOL_SIZE;
  ------------------
  |  |   27|      1|#define BN_CTX_POOL_SIZE        16
  ------------------
  338|      1|        p->used++;
  339|       |        /* Return the first bignum from the new pool */
  340|      1|        return item->vals;
  341|      1|    }
  342|       |
  343|  9.26k|    if (!p->used)
  ------------------
  |  Branch (343:9): [True: 3.81k, False: 5.45k]
  ------------------
  344|  3.81k|        p->current = p->head;
  345|  5.45k|    else if ((p->used % BN_CTX_POOL_SIZE) == 0)
  ------------------
  |  |   27|  5.45k|#define BN_CTX_POOL_SIZE        16
  ------------------
  |  Branch (345:14): [True: 0, False: 5.45k]
  ------------------
  346|      0|        p->current = p->current->next;
  347|  9.26k|    return p->current->vals + ((p->used++) % BN_CTX_POOL_SIZE);
  ------------------
  |  |   27|  9.26k|#define BN_CTX_POOL_SIZE        16
  ------------------
  348|  9.26k|}
bn_ctx.c:BN_POOL_release:
  351|  3.81k|{
  352|  3.81k|    unsigned int offset = (p->used - 1) % BN_CTX_POOL_SIZE;
  ------------------
  |  |   27|  3.81k|#define BN_CTX_POOL_SIZE        16
  ------------------
  353|       |
  354|  3.81k|    p->used -= num;
  355|  13.0k|    while (num--) {
  ------------------
  |  Branch (355:12): [True: 9.26k, False: 3.81k]
  ------------------
  356|  9.26k|        bn_check_top(p->current->vals + offset);
  357|  9.26k|        if (offset == 0) {
  ------------------
  |  Branch (357:13): [True: 3.81k, False: 5.45k]
  ------------------
  358|  3.81k|            offset = BN_CTX_POOL_SIZE - 1;
  ------------------
  |  |   27|  3.81k|#define BN_CTX_POOL_SIZE        16
  ------------------
  359|  3.81k|            p->current = p->current->prev;
  360|  3.81k|        } else
  361|  5.45k|            offset--;
  362|  9.26k|    }
  363|  3.81k|}

BN_div:
  211|  2.72k|{
  212|  2.72k|    int ret;
  213|       |
  214|  2.72k|    if (BN_is_zero(divisor)) {
  ------------------
  |  Branch (214:9): [True: 0, False: 2.72k]
  ------------------
  215|      0|        BNerr(BN_F_BN_DIV, BN_R_DIV_BY_ZERO);
  ------------------
  |  |  102|      0|# define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |   29|      0|#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
  |  |  ------------------
  ------------------
  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.72k|    if (divisor->d[divisor->top - 1] == 0) {
  ------------------
  |  Branch (224:9): [True: 0, False: 2.72k]
  ------------------
  225|      0|        BNerr(BN_F_BN_DIV, BN_R_NOT_INITIALIZED);
  ------------------
  |  |  102|      0|# define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |   29|      0|#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
  |  |  ------------------
  ------------------
  226|      0|        return 0;
  227|      0|    }
  228|       |
  229|  2.72k|    ret = bn_div_fixed_top(dv, rm, num, divisor, ctx);
  230|       |
  231|  2.72k|    if (ret) {
  ------------------
  |  Branch (231:9): [True: 2.72k, False: 0]
  ------------------
  232|  2.72k|        if (dv != NULL)
  ------------------
  |  Branch (232:13): [True: 2.72k, False: 0]
  ------------------
  233|  2.72k|            bn_correct_top(dv);
  234|  2.72k|        if (rm != NULL)
  ------------------
  |  Branch (234:13): [True: 2.72k, False: 0]
  ------------------
  235|  2.72k|            bn_correct_top(rm);
  236|  2.72k|    }
  237|       |
  238|  2.72k|    return ret;
  239|  2.72k|}
bn_div_fixed_top:
  266|  2.72k|{
  267|  2.72k|    int norm_shift, i, j, loop;
  268|  2.72k|    BIGNUM *tmp, *snum, *sdiv, *res;
  269|  2.72k|    BN_ULONG *resp, *wnum, *wnumtop;
  ------------------
  |  |   31|  2.72k|#  define BN_ULONG        unsigned long
  ------------------
  270|  2.72k|    BN_ULONG d0, d1;
  ------------------
  |  |   31|  2.72k|#  define BN_ULONG        unsigned long
  ------------------
  271|  2.72k|    int num_n, div_n, num_neg;
  272|       |
  273|  2.72k|    assert(divisor->top > 0 && divisor->d[divisor->top - 1] != 0);
  274|       |
  275|  2.72k|    bn_check_top(num);
  276|  2.72k|    bn_check_top(divisor);
  277|  2.72k|    bn_check_top(dv);
  278|  2.72k|    bn_check_top(rm);
  279|       |
  280|  2.72k|    BN_CTX_start(ctx);
  281|  2.72k|    res = (dv == NULL) ? BN_CTX_get(ctx) : dv;
  ------------------
  |  Branch (281:11): [True: 0, False: 2.72k]
  ------------------
  282|  2.72k|    tmp = BN_CTX_get(ctx);
  283|  2.72k|    snum = BN_CTX_get(ctx);
  284|  2.72k|    sdiv = BN_CTX_get(ctx);
  285|  2.72k|    if (sdiv == NULL)
  ------------------
  |  Branch (285:9): [True: 0, False: 2.72k]
  ------------------
  286|      0|        goto err;
  287|       |
  288|       |    /* First we normalise the numbers */
  289|  2.72k|    if (!BN_copy(sdiv, divisor))
  ------------------
  |  Branch (289:9): [True: 0, False: 2.72k]
  ------------------
  290|      0|        goto err;
  291|  2.72k|    norm_shift = bn_left_align(sdiv);
  292|  2.72k|    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.72k|    if (!(bn_lshift_fixed_top(snum, num, norm_shift)))
  ------------------
  |  Branch (300:9): [True: 0, False: 2.72k]
  ------------------
  301|      0|        goto err;
  302|       |
  303|  2.72k|    div_n = sdiv->top;
  304|  2.72k|    num_n = snum->top;
  305|       |
  306|  2.72k|    if (num_n <= div_n) {
  ------------------
  |  Branch (306:9): [True: 423, False: 2.30k]
  ------------------
  307|       |        /* caller didn't pad dividend -> no constant-time guarantee... */
  308|    423|        if (bn_wexpand(snum, div_n + 1) == NULL)
  ------------------
  |  Branch (308:13): [True: 0, False: 423]
  ------------------
  309|      0|            goto err;
  310|    423|        memset(&(snum->d[num_n]), 0, (div_n - num_n + 1) * sizeof(BN_ULONG));
  311|    423|        snum->top = num_n = div_n + 1;
  312|    423|    }
  313|       |
  314|  2.72k|    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.72k|    wnum = &(snum->d[loop]);
  320|  2.72k|    wnumtop = &(snum->d[num_n - 1]);
  321|       |
  322|       |    /* Get the top 2 words of sdiv */
  323|  2.72k|    d0 = sdiv->d[div_n - 1];
  324|  2.72k|    d1 = (div_n == 1) ? 0 : sdiv->d[div_n - 2];
  ------------------
  |  Branch (324:10): [True: 679, False: 2.04k]
  ------------------
  325|       |
  326|       |    /* Setup quotient */
  327|  2.72k|    if (!bn_wexpand(res, loop))
  ------------------
  |  Branch (327:9): [True: 0, False: 2.72k]
  ------------------
  328|      0|        goto err;
  329|  2.72k|    num_neg = num->neg;
  330|  2.72k|    res->neg = (num_neg ^ divisor->neg);
  331|  2.72k|    res->top = loop;
  332|  2.72k|    res->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  219|  2.72k|#  define BN_FLG_FIXED_TOP 0
  ------------------
  333|  2.72k|    resp = &(res->d[loop]);
  334|       |
  335|       |    /* space for temp */
  336|  2.72k|    if (!bn_wexpand(tmp, (div_n + 1)))
  ------------------
  |  Branch (336:9): [True: 0, False: 2.72k]
  ------------------
  337|      0|        goto err;
  338|       |
  339|   875k|    for (i = 0; i < loop; i++, wnumtop--) {
  ------------------
  |  Branch (339:17): [True: 872k, False: 2.72k]
  ------------------
  340|   872k|        BN_ULONG q, l0;
  ------------------
  |  |   31|   872k|#  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|   872k|        BN_ULONG n0, n1, rem = 0;
  ------------------
  |  |   31|   872k|#  define BN_ULONG        unsigned long
  ------------------
  349|       |
  350|   872k|        n0 = wnumtop[0];
  351|   872k|        n1 = wnumtop[-1];
  352|   872k|        if (n0 == d0)
  ------------------
  |  Branch (352:13): [True: 8.78k, False: 863k]
  ------------------
  353|  8.78k|            q = BN_MASK2;
  ------------------
  |  |   87|  8.78k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  354|   863k|        else {                  /* n0 < d0 */
  355|   863k|            BN_ULONG n2 = (wnumtop == wnum) ? 0 : wnumtop[-2];
  ------------------
  |  |   31|   863k|#  define BN_ULONG        unsigned long
  ------------------
  |  Branch (355:27): [True: 224k, False: 639k]
  ------------------
  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|   863k|            BN_ULONG t2l, t2h;
  ------------------
  |  |   31|   863k|#  define BN_ULONG        unsigned long
  ------------------
  385|       |
  386|   863k|            q = bn_div_words(n0, n1, d0);
  387|   863k|#   ifndef REMAINDER_IS_ALREADY_CALCULATED
  388|   863k|            rem = (n1 - q * d0) & BN_MASK2;
  ------------------
  |  |   87|   863k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  389|   863k|#   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|   863k|            {
  398|   863k|                BN_ULONG ql, qh;
  ------------------
  |  |   31|   863k|#  define BN_ULONG        unsigned long
  ------------------
  399|   863k|                t2l = LBITS(d1);
  ------------------
  |  |  574|   863k|#  define LBITS(a)        ((a)&BN_MASK2l)
  |  |  ------------------
  |  |  |  |   88|   863k|#  define BN_MASK2l       (0xffffffffL)
  |  |  ------------------
  ------------------
  400|   863k|                t2h = HBITS(d1);
  ------------------
  |  |  575|   863k|#  define HBITS(a)        (((a)>>BN_BITS4)&BN_MASK2l)
  |  |  ------------------
  |  |  |  |   86|   863k|#  define BN_BITS4        32
  |  |  ------------------
  |  |               #  define HBITS(a)        (((a)>>BN_BITS4)&BN_MASK2l)
  |  |  ------------------
  |  |  |  |   88|   863k|#  define BN_MASK2l       (0xffffffffL)
  |  |  ------------------
  ------------------
  401|   863k|                ql = LBITS(q);
  ------------------
  |  |  574|   863k|#  define LBITS(a)        ((a)&BN_MASK2l)
  |  |  ------------------
  |  |  |  |   88|   863k|#  define BN_MASK2l       (0xffffffffL)
  |  |  ------------------
  ------------------
  402|   863k|                qh = HBITS(q);
  ------------------
  |  |  575|   863k|#  define HBITS(a)        (((a)>>BN_BITS4)&BN_MASK2l)
  |  |  ------------------
  |  |  |  |   86|   863k|#  define BN_BITS4        32
  |  |  ------------------
  |  |               #  define HBITS(a)        (((a)>>BN_BITS4)&BN_MASK2l)
  |  |  ------------------
  |  |  |  |   88|   863k|#  define BN_MASK2l       (0xffffffffL)
  |  |  ------------------
  ------------------
  403|   863k|                mul64(t2l, t2h, ql, qh); /* t2=(BN_ULLONG)d1*q; */
  ------------------
  |  |  583|   863k|        { \
  |  |  584|   863k|        BN_ULONG m,m1,lt,ht; \
  |  |  ------------------
  |  |  |  |   31|   863k|#  define BN_ULONG        unsigned long
  |  |  ------------------
  |  |  585|   863k| \
  |  |  586|   863k|        lt=l; \
  |  |  587|   863k|        ht=h; \
  |  |  588|   863k|        m =(bh)*(lt); \
  |  |  589|   863k|        lt=(bl)*(lt); \
  |  |  590|   863k|        m1=(bl)*(ht); \
  |  |  591|   863k|        ht =(bh)*(ht); \
  |  |  592|   863k|        m=(m+m1)&BN_MASK2; ht += L2HBITS((BN_ULONG)(m < m1)); \
  |  |  ------------------
  |  |  |  |   87|   863k|#  define BN_MASK2        (0xffffffffffffffffL)
  |  |  ------------------
  |  |                       m=(m+m1)&BN_MASK2; ht += L2HBITS((BN_ULONG)(m < m1)); \
  |  |  ------------------
  |  |  |  |  576|   863k|#  define L2HBITS(a)      (((a)<<BN_BITS4)&BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   86|   863k|#  define BN_BITS4        32
  |  |  |  |  ------------------
  |  |  |  |               #  define L2HBITS(a)      (((a)<<BN_BITS4)&BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|   863k|#  define BN_MASK2        (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  593|   863k|        ht+=HBITS(m); \
  |  |  ------------------
  |  |  |  |  575|   863k|#  define HBITS(a)        (((a)>>BN_BITS4)&BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   86|   863k|#  define BN_BITS4        32
  |  |  |  |  ------------------
  |  |  |  |               #  define HBITS(a)        (((a)>>BN_BITS4)&BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   88|   863k|#  define BN_MASK2l       (0xffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  594|   863k|        m1=L2HBITS(m); \
  |  |  ------------------
  |  |  |  |  576|   863k|#  define L2HBITS(a)      (((a)<<BN_BITS4)&BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   86|   863k|#  define BN_BITS4        32
  |  |  |  |  ------------------
  |  |  |  |               #  define L2HBITS(a)      (((a)<<BN_BITS4)&BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|   863k|#  define BN_MASK2        (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  595|   863k|        lt=(lt+m1)&BN_MASK2; ht += (lt < m1); \
  |  |  ------------------
  |  |  |  |   87|   863k|#  define BN_MASK2        (0xffffffffffffffffL)
  |  |  ------------------
  |  |  596|   863k|        (l)=lt; \
  |  |  597|   863k|        (h)=ht; \
  |  |  598|   863k|        }
  ------------------
  404|   863k|            }
  405|   863k|#   endif
  406|       |
  407|   938k|            for (;;) {
  408|   938k|                if ((t2h < rem) || ((t2h == rem) && (t2l <= n2)))
  ------------------
  |  Branch (408:21): [True: 699k, False: 238k]
  |  Branch (408:37): [True: 106k, False: 131k]
  |  Branch (408:53): [True: 106k, False: 124]
  ------------------
  409|   806k|                    break;
  410|   132k|                q--;
  411|   132k|                rem += d0;
  412|   132k|                if (rem < d0)
  ------------------
  |  Branch (412:21): [True: 57.4k, False: 74.5k]
  ------------------
  413|  57.4k|                    break;      /* don't let rem overflow */
  414|  74.5k|                if (t2l < d1)
  ------------------
  |  Branch (414:21): [True: 49.9k, False: 24.6k]
  ------------------
  415|  49.9k|                    t2h--;
  416|  74.5k|                t2l -= d1;
  417|  74.5k|            }
  418|   863k|#  endif                        /* !BN_LLONG */
  419|   863k|        }
  420|   872k|# endif                         /* !BN_DIV3W */
  421|       |
  422|   872k|        l0 = bn_mul_words(tmp->d, sdiv->d, div_n, q);
  423|   872k|        tmp->d[div_n] = l0;
  424|   872k|        wnum--;
  425|       |        /*
  426|       |         * ignore top values of the bignums just sub the two BN_ULONG arrays
  427|       |         * with bn_sub_words
  428|       |         */
  429|   872k|        l0 = bn_sub_words(wnum, wnum, tmp->d, div_n + 1);
  430|   872k|        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|  2.18G|        for (l0 = 0 - l0, j = 0; j < div_n; j++)
  ------------------
  |  Branch (436:34): [True: 2.18G, False: 872k]
  ------------------
  437|  2.18G|            tmp->d[j] = sdiv->d[j] & l0;
  438|   872k|        l0 = bn_add_words(wnum, wnum, tmp->d, div_n);
  439|   872k|        (*wnumtop) += l0;
  440|   872k|        assert((*wnumtop) == 0);
  441|       |
  442|       |        /* store part of the result */
  443|   872k|        *--resp = q;
  444|   872k|    }
  445|       |    /* snum holds remainder, it's as wide as divisor */
  446|  2.72k|    snum->neg = num_neg;
  447|  2.72k|    snum->top = div_n;
  448|  2.72k|    snum->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  219|  2.72k|#  define BN_FLG_FIXED_TOP 0
  ------------------
  449|       |
  450|  2.72k|    if (rm != NULL && bn_rshift_fixed_top(rm, snum, norm_shift) == 0)
  ------------------
  |  Branch (450:9): [True: 2.72k, False: 0]
  |  Branch (450:23): [True: 0, False: 2.72k]
  ------------------
  451|      0|        goto err;
  452|       |
  453|  2.72k|    BN_CTX_end(ctx);
  454|  2.72k|    return 1;
  455|      0| err:
  456|      0|    bn_check_top(rm);
  457|      0|    BN_CTX_end(ctx);
  458|      0|    return 0;
  459|  2.72k|}
bn_div.c:bn_left_align:
  142|  2.72k|{
  143|  2.72k|    BN_ULONG *d = num->d, n, m, rmask;
  ------------------
  |  |   31|  2.72k|#  define BN_ULONG        unsigned long
  ------------------
  144|  2.72k|    int top = num->top;
  145|  2.72k|    int rshift = BN_num_bits_word(d[top - 1]), lshift, i;
  146|       |
  147|  2.72k|    lshift = BN_BITS2 - rshift;
  ------------------
  |  |   48|  2.72k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|  2.72k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  148|  2.72k|    rshift %= BN_BITS2;            /* say no to undefined behaviour */
  ------------------
  |  |   48|  2.72k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|  2.72k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  149|  2.72k|    rmask = (BN_ULONG)0 - rshift;  /* rmask = 0 - (rshift != 0) */
  150|  2.72k|    rmask |= rmask >> 8;
  151|       |
  152|   823k|    for (i = 0, m = 0; i < top; i++) {
  ------------------
  |  Branch (152:24): [True: 820k, False: 2.72k]
  ------------------
  153|   820k|        n = d[i];
  154|   820k|        d[i] = ((n << lshift) | m) & BN_MASK2;
  ------------------
  |  |   87|   820k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  155|   820k|        m = (n >> rshift) & rmask;
  156|   820k|    }
  157|       |
  158|  2.72k|    return lshift;
  159|  2.72k|}

ERR_load_BN_strings:
  110|      2|{
  111|      2|#ifndef OPENSSL_NO_ERR
  112|      2|    if (ERR_func_error_string(BN_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (112:9): [True: 2, False: 0]
  ------------------
  113|      2|        ERR_load_strings_const(BN_str_functs);
  114|      2|        ERR_load_strings_const(BN_str_reasons);
  115|      2|    }
  116|      2|#endif
  117|      2|    return 1;
  118|      2|}

BN_num_bits_word:
  100|  3.81k|{
  101|  3.81k|    BN_ULONG x, mask;
  ------------------
  |  |   31|  3.81k|#  define BN_ULONG        unsigned long
  ------------------
  102|  3.81k|    int bits = (l != 0);
  103|       |
  104|  3.81k|#if BN_BITS2 > 32
  105|  3.81k|    x = l >> 32;
  106|  3.81k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   87|  3.81k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  107|  3.81k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   48|  3.81k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|  3.81k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  108|  3.81k|    bits += 32 & mask;
  109|  3.81k|    l ^= (x ^ l) & mask;
  110|  3.81k|#endif
  111|       |
  112|  3.81k|    x = l >> 16;
  113|  3.81k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   87|  3.81k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  114|  3.81k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   48|  3.81k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|  3.81k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  115|  3.81k|    bits += 16 & mask;
  116|  3.81k|    l ^= (x ^ l) & mask;
  117|       |
  118|  3.81k|    x = l >> 8;
  119|  3.81k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   87|  3.81k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  120|  3.81k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   48|  3.81k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|  3.81k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  121|  3.81k|    bits += 8 & mask;
  122|  3.81k|    l ^= (x ^ l) & mask;
  123|       |
  124|  3.81k|    x = l >> 4;
  125|  3.81k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   87|  3.81k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  126|  3.81k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   48|  3.81k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|  3.81k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  127|  3.81k|    bits += 4 & mask;
  128|  3.81k|    l ^= (x ^ l) & mask;
  129|       |
  130|  3.81k|    x = l >> 2;
  131|  3.81k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   87|  3.81k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  132|  3.81k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   48|  3.81k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|  3.81k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  133|  3.81k|    bits += 2 & mask;
  134|  3.81k|    l ^= (x ^ l) & mask;
  135|       |
  136|  3.81k|    x = l >> 1;
  137|  3.81k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   87|  3.81k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  138|  3.81k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   48|  3.81k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|  3.81k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  139|  3.81k|    bits += 1 & mask;
  140|       |
  141|  3.81k|    return bits;
  142|  3.81k|}
bn_init:
  235|     16|{
  236|     16|    static BIGNUM nilbn;
  237|       |
  238|     16|    *a = nilbn;
  239|     16|    bn_check_top(a);
  240|     16|}
BN_new:
  243|     10|{
  244|     10|    BIGNUM *ret;
  245|       |
  246|     10|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
  ------------------
  |  |  120|     10|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|     10|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|     10|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (246:9): [True: 0, False: 10]
  ------------------
  247|      0|        BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
  ------------------
  |  |  102|      0|# define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |   29|      0|#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
  |  |  ------------------
  ------------------
  248|      0|        return NULL;
  249|      0|    }
  250|     10|    ret->flags = BN_FLG_MALLOCED;
  ------------------
  |  |   52|     10|# define BN_FLG_MALLOCED         0x01
  ------------------
  251|     10|    bn_check_top(ret);
  252|     10|    return ret;
  253|     10|}
bn_expand2:
  302|    689|{
  303|    689|    if (words > b->dmax) {
  ------------------
  |  Branch (303:9): [True: 689, False: 0]
  ------------------
  304|    689|        BN_ULONG *a = bn_expand_internal(b, words);
  ------------------
  |  |   31|    689|#  define BN_ULONG        unsigned long
  ------------------
  305|    689|        if (!a)
  ------------------
  |  Branch (305:13): [True: 0, False: 689]
  ------------------
  306|      0|            return NULL;
  307|    689|        if (b->d != NULL)
  ------------------
  |  Branch (307:13): [True: 681, False: 8]
  ------------------
  308|    681|            bn_free_d(b, 1);
  309|    689|        b->d = a;
  310|    689|        b->dmax = words;
  311|    689|    }
  312|       |
  313|    689|    return b;
  314|    689|}
BN_copy:
  336|  2.72k|{
  337|  2.72k|    int bn_words;
  338|       |
  339|  2.72k|    bn_check_top(b);
  340|       |
  341|  2.72k|    bn_words = BN_get_flags(b, BN_FLG_CONSTTIME) ? b->dmax : b->top;
  ------------------
  |  |   61|  2.72k|# define BN_FLG_CONSTTIME        0x04
  ------------------
  |  Branch (341:16): [True: 0, False: 2.72k]
  ------------------
  342|       |
  343|  2.72k|    if (a == b)
  ------------------
  |  Branch (343:9): [True: 0, False: 2.72k]
  ------------------
  344|      0|        return a;
  345|  2.72k|    if (bn_wexpand(a, bn_words) == NULL)
  ------------------
  |  Branch (345:9): [True: 0, False: 2.72k]
  ------------------
  346|      0|        return NULL;
  347|       |
  348|  2.72k|    if (b->top > 0)
  ------------------
  |  Branch (348:9): [True: 2.72k, False: 0]
  ------------------
  349|  2.72k|        memcpy(a->d, b->d, sizeof(b->d[0]) * bn_words);
  350|       |
  351|  2.72k|    a->neg = b->neg;
  352|  2.72k|    a->top = b->top;
  353|  2.72k|    a->flags |= b->flags & BN_FLG_FIXED_TOP;
  ------------------
  |  |  219|  2.72k|#  define BN_FLG_FIXED_TOP 0
  ------------------
  354|  2.72k|    bn_check_top(a);
  355|  2.72k|    return a;
  356|  2.72k|}
BN_set_word:
  420|  9.77k|{
  421|  9.77k|    bn_check_top(a);
  422|  9.77k|    if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
  ------------------
  |  Branch (422:9): [True: 0, False: 9.77k]
  ------------------
  423|      0|        return 0;
  424|  9.77k|    a->neg = 0;
  425|  9.77k|    a->d[0] = w;
  426|  9.77k|    a->top = (w ? 1 : 0);
  ------------------
  |  Branch (426:15): [True: 0, False: 9.77k]
  ------------------
  427|  9.77k|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  219|  9.77k|#  define BN_FLG_FIXED_TOP 0
  ------------------
  428|  9.77k|    bn_check_top(a);
  429|  9.77k|    return 1;
  430|  9.77k|}
BN_bin2bn:
  433|  5.48k|{
  434|  5.48k|    unsigned int i, m;
  435|  5.48k|    unsigned int n;
  436|  5.48k|    BN_ULONG l;
  ------------------
  |  |   31|  5.48k|#  define BN_ULONG        unsigned long
  ------------------
  437|  5.48k|    BIGNUM *bn = NULL;
  438|       |
  439|  5.48k|    if (ret == NULL)
  ------------------
  |  Branch (439:9): [True: 0, False: 5.48k]
  ------------------
  440|      0|        ret = bn = BN_new();
  441|  5.48k|    if (ret == NULL)
  ------------------
  |  Branch (441:9): [True: 0, False: 5.48k]
  ------------------
  442|      0|        return NULL;
  443|  5.48k|    bn_check_top(ret);
  444|       |    /* Skip leading zero's. */
  445|  69.5k|    for ( ; len > 0 && *s == 0; s++, len--)
  ------------------
  |  Branch (445:13): [True: 69.1k, False: 358]
  |  Branch (445:24): [True: 64.0k, False: 5.12k]
  ------------------
  446|  64.0k|        continue;
  447|  5.48k|    n = len;
  448|  5.48k|    if (n == 0) {
  ------------------
  |  Branch (448:9): [True: 358, False: 5.12k]
  ------------------
  449|    358|        ret->top = 0;
  450|    358|        return ret;
  451|    358|    }
  452|  5.12k|    i = ((n - 1) / BN_BYTES) + 1;
  ------------------
  |  |   32|  5.12k|#  define BN_BYTES        8
  ------------------
  453|  5.12k|    m = ((n - 1) % (BN_BYTES));
  ------------------
  |  |   32|  5.12k|#  define BN_BYTES        8
  ------------------
  454|  5.12k|    if (bn_wexpand(ret, (int)i) == NULL) {
  ------------------
  |  Branch (454:9): [True: 0, False: 5.12k]
  ------------------
  455|      0|        BN_free(bn);
  456|      0|        return NULL;
  457|      0|    }
  458|  5.12k|    ret->top = i;
  459|  5.12k|    ret->neg = 0;
  460|  5.12k|    l = 0;
  461|  17.9M|    while (n--) {
  ------------------
  |  Branch (461:12): [True: 17.9M, False: 5.12k]
  ------------------
  462|  17.9M|        l = (l << 8L) | *(s++);
  463|  17.9M|        if (m-- == 0) {
  ------------------
  |  Branch (463:13): [True: 2.24M, False: 15.6M]
  ------------------
  464|  2.24M|            ret->d[--i] = l;
  465|  2.24M|            l = 0;
  466|  2.24M|            m = BN_BYTES - 1;
  ------------------
  |  |   32|  2.24M|#  define BN_BYTES        8
  ------------------
  467|  2.24M|        }
  468|  17.9M|    }
  469|       |    /*
  470|       |     * need to call this due to clear byte at top if avoiding having the top
  471|       |     * bit set (-ve number)
  472|       |     */
  473|  5.12k|    bn_correct_top(ret);
  474|  5.12k|    return ret;
  475|  5.12k|}
BN_ucmp:
  597|    341|{
  598|    341|    int i;
  599|    341|    BN_ULONG t1, t2, *ap, *bp;
  ------------------
  |  |   31|    341|#  define BN_ULONG        unsigned long
  ------------------
  600|       |
  601|    341|    bn_check_top(a);
  602|    341|    bn_check_top(b);
  603|       |
  604|    341|    i = a->top - b->top;
  605|    341|    if (i != 0)
  ------------------
  |  Branch (605:9): [True: 341, False: 0]
  ------------------
  606|    341|        return i;
  607|      0|    ap = a->d;
  608|      0|    bp = b->d;
  609|      0|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (609:26): [True: 0, False: 0]
  ------------------
  610|      0|        t1 = ap[i];
  611|      0|        t2 = bp[i];
  612|      0|        if (t1 != t2)
  ------------------
  |  Branch (612:13): [True: 0, False: 0]
  ------------------
  613|      0|            return ((t1 > t2) ? 1 : -1);
  ------------------
  |  Branch (613:21): [True: 0, False: 0]
  ------------------
  614|      0|    }
  615|      0|    return 0;
  616|      0|}
BN_cmp:
  619|  2.72k|{
  620|  2.72k|    int i;
  621|  2.72k|    int gt, lt;
  622|  2.72k|    BN_ULONG t1, t2;
  ------------------
  |  |   31|  2.72k|#  define BN_ULONG        unsigned long
  ------------------
  623|       |
  624|  2.72k|    if ((a == NULL) || (b == NULL)) {
  ------------------
  |  Branch (624:9): [True: 0, False: 2.72k]
  |  Branch (624:24): [True: 0, False: 2.72k]
  ------------------
  625|      0|        if (a != NULL)
  ------------------
  |  Branch (625:13): [True: 0, False: 0]
  ------------------
  626|      0|            return -1;
  627|      0|        else if (b != NULL)
  ------------------
  |  Branch (627:18): [True: 0, False: 0]
  ------------------
  628|      0|            return 1;
  629|      0|        else
  630|      0|            return 0;
  631|      0|    }
  632|       |
  633|  2.72k|    bn_check_top(a);
  634|  2.72k|    bn_check_top(b);
  635|       |
  636|  2.72k|    if (a->neg != b->neg) {
  ------------------
  |  Branch (636:9): [True: 0, False: 2.72k]
  ------------------
  637|      0|        if (a->neg)
  ------------------
  |  Branch (637:13): [True: 0, False: 0]
  ------------------
  638|      0|            return -1;
  639|      0|        else
  640|      0|            return 1;
  641|      0|    }
  642|  2.72k|    if (a->neg == 0) {
  ------------------
  |  Branch (642:9): [True: 1.02k, False: 1.70k]
  ------------------
  643|  1.02k|        gt = 1;
  644|  1.02k|        lt = -1;
  645|  1.70k|    } else {
  646|  1.70k|        gt = -1;
  647|  1.70k|        lt = 1;
  648|  1.70k|    }
  649|       |
  650|  2.72k|    if (a->top > b->top)
  ------------------
  |  Branch (650:9): [True: 0, False: 2.72k]
  ------------------
  651|      0|        return gt;
  652|  2.72k|    if (a->top < b->top)
  ------------------
  |  Branch (652:9): [True: 0, False: 2.72k]
  ------------------
  653|      0|        return lt;
  654|  1.42M|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (654:26): [True: 1.42M, False: 2.72k]
  ------------------
  655|  1.42M|        t1 = a->d[i];
  656|  1.42M|        t2 = b->d[i];
  657|  1.42M|        if (t1 > t2)
  ------------------
  |  Branch (657:13): [True: 0, False: 1.42M]
  ------------------
  658|      0|            return gt;
  659|  1.42M|        if (t1 < t2)
  ------------------
  |  Branch (659:13): [True: 0, False: 1.42M]
  ------------------
  660|      0|            return lt;
  661|  1.42M|    }
  662|  2.72k|    return 0;
  663|  2.72k|}
BN_set_negative:
  743|  5.48k|{
  744|  5.48k|    if (b && !BN_is_zero(a))
  ------------------
  |  Branch (744:9): [True: 3.55k, False: 1.93k]
  |  Branch (744:14): [True: 3.46k, False: 82]
  ------------------
  745|  3.46k|        a->neg = 1;
  746|  2.01k|    else
  747|  2.01k|        a->neg = 0;
  748|  5.48k|}
bn_cmp_words:
  751|  2.34M|{
  752|  2.34M|    int i;
  753|  2.34M|    BN_ULONG aa, bb;
  ------------------
  |  |   31|  2.34M|#  define BN_ULONG        unsigned long
  ------------------
  754|       |
  755|  2.34M|    if (n == 0)
  ------------------
  |  Branch (755:9): [True: 0, False: 2.34M]
  ------------------
  756|      0|        return 0;
  757|       |
  758|  2.34M|    aa = a[n - 1];
  759|  2.34M|    bb = b[n - 1];
  760|  2.34M|    if (aa != bb)
  ------------------
  |  Branch (760:9): [True: 2.10M, False: 236k]
  ------------------
  761|  2.10M|        return ((aa > bb) ? 1 : -1);
  ------------------
  |  Branch (761:17): [True: 1.09M, False: 1.01M]
  ------------------
  762|  2.55M|    for (i = n - 2; i >= 0; i--) {
  ------------------
  |  Branch (762:21): [True: 2.45M, False: 104k]
  ------------------
  763|  2.45M|        aa = a[i];
  764|  2.45M|        bb = b[i];
  765|  2.45M|        if (aa != bb)
  ------------------
  |  Branch (765:13): [True: 131k, False: 2.32M]
  ------------------
  766|   131k|            return ((aa > bb) ? 1 : -1);
  ------------------
  |  Branch (766:21): [True: 59.3k, False: 72.1k]
  ------------------
  767|  2.45M|    }
  768|   104k|    return 0;
  769|   236k|}
bn_cmp_part_words:
  781|  2.34M|{
  782|  2.34M|    int n, i;
  783|  2.34M|    n = cl - 1;
  784|       |
  785|  2.34M|    if (dl < 0) {
  ------------------
  |  Branch (785:9): [True: 1.73k, False: 2.34M]
  ------------------
  786|  41.1k|        for (i = dl; i < 0; i++) {
  ------------------
  |  Branch (786:22): [True: 40.8k, False: 328]
  ------------------
  787|  40.8k|            if (b[n - i] != 0)
  ------------------
  |  Branch (787:17): [True: 1.41k, False: 39.4k]
  ------------------
  788|  1.41k|                return -1;      /* a < b */
  789|  40.8k|        }
  790|  1.73k|    }
  791|  2.34M|    if (dl > 0) {
  ------------------
  |  Branch (791:9): [True: 1.65k, False: 2.34M]
  ------------------
  792|  13.3k|        for (i = dl; i > 0; i--) {
  ------------------
  |  Branch (792:22): [True: 13.1k, False: 249]
  ------------------
  793|  13.1k|            if (a[n + i] != 0)
  ------------------
  |  Branch (793:17): [True: 1.40k, False: 11.7k]
  ------------------
  794|  1.40k|                return 1;       /* a > b */
  795|  13.1k|        }
  796|  1.65k|    }
  797|  2.34M|    return bn_cmp_words(a, b, cl);
  798|  2.34M|}
BN_is_zero:
  904|  12.6k|{
  905|  12.6k|    return a->top == 0;
  906|  12.6k|}
BN_is_negative:
  924|  9.58k|{
  925|  9.58k|    return (a->neg != 0);
  926|  9.58k|}
BN_get_flags:
  970|  4.78k|{
  971|  4.78k|    return b->flags & n;
  972|  4.78k|}
bn_wexpand:
 1000|  25.2k|{
 1001|  25.2k|    return (words <= a->dmax) ? a : bn_expand2(a, words);
  ------------------
  |  Branch (1001:12): [True: 24.5k, False: 685]
  ------------------
 1002|  25.2k|}
bn_correct_top:
 1027|  13.3k|{
 1028|  13.3k|    BN_ULONG *ftl;
  ------------------
  |  |   31|  13.3k|#  define BN_ULONG        unsigned long
  ------------------
 1029|  13.3k|    int tmp_top = a->top;
 1030|       |
 1031|  13.3k|    if (tmp_top > 0) {
  ------------------
  |  Branch (1031:9): [True: 12.7k, False: 508]
  ------------------
 1032|   286k|        for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
  ------------------
  |  Branch (1032:38): [True: 285k, False: 1.20k]
  ------------------
 1033|   285k|            ftl--;
 1034|   285k|            if (*ftl != 0)
  ------------------
  |  Branch (1034:17): [True: 11.5k, False: 273k]
  ------------------
 1035|  11.5k|                break;
 1036|   285k|        }
 1037|  12.7k|        a->top = tmp_top;
 1038|  12.7k|    }
 1039|  13.3k|    if (a->top == 0)
  ------------------
  |  Branch (1039:9): [True: 1.71k, False: 11.5k]
  ------------------
 1040|  1.71k|        a->neg = 0;
 1041|  13.3k|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  219|  13.3k|#  define BN_FLG_FIXED_TOP 0
  ------------------
 1042|  13.3k|    bn_pollute(a);
 1043|  13.3k|}
bn_lib.c:bn_free_d:
  202|    681|{
  203|    681|    if (BN_get_flags(a, BN_FLG_SECURE))
  ------------------
  |  |   62|    681|# define BN_FLG_SECURE           0x08
  ------------------
  |  Branch (203:9): [True: 0, False: 681]
  ------------------
  204|      0|        OPENSSL_secure_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  142|      0|        CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  205|    681|    else if (clear != 0)
  ------------------
  |  Branch (205:14): [True: 681, False: 0]
  ------------------
  206|    681|        OPENSSL_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  126|    681|        CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|    681|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|    681|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  207|      0|    else
  208|      0|        OPENSSL_free(a->d);
  ------------------
  |  |  128|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  209|    681|}
bn_lib.c:bn_expand_internal:
  266|    689|{
  267|    689|    BN_ULONG *a = NULL;
  ------------------
  |  |   31|    689|#  define BN_ULONG        unsigned long
  ------------------
  268|       |
  269|    689|    if (words > (INT_MAX / (4 * BN_BITS2))) {
  ------------------
  |  |   48|    689|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|    689|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  |  Branch (269:9): [True: 0, False: 689]
  ------------------
  270|      0|        BNerr(BN_F_BN_EXPAND_INTERNAL, BN_R_BIGNUM_TOO_LONG);
  ------------------
  |  |  102|      0|# define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |   29|      0|#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
  |  |  ------------------
  ------------------
  271|      0|        return NULL;
  272|      0|    }
  273|    689|    if (BN_get_flags(b, BN_FLG_STATIC_DATA)) {
  ------------------
  |  |   53|    689|# define BN_FLG_STATIC_DATA      0x02
  ------------------
  |  Branch (273:9): [True: 0, False: 689]
  ------------------
  274|      0|        BNerr(BN_F_BN_EXPAND_INTERNAL, BN_R_EXPAND_ON_STATIC_BIGNUM_DATA);
  ------------------
  |  |  102|      0|# define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |   29|      0|#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
  |  |  ------------------
  ------------------
  275|      0|        return NULL;
  276|      0|    }
  277|    689|    if (BN_get_flags(b, BN_FLG_SECURE))
  ------------------
  |  |   62|    689|# define BN_FLG_SECURE           0x08
  ------------------
  |  Branch (277:9): [True: 0, False: 689]
  ------------------
  278|      0|        a = OPENSSL_secure_zalloc(words * sizeof(*a));
  ------------------
  |  |  138|      0|        CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  279|    689|    else
  280|    689|        a = OPENSSL_zalloc(words * sizeof(*a));
  ------------------
  |  |  120|    689|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|    689|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|    689|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  281|    689|    if (a == NULL) {
  ------------------
  |  Branch (281:9): [True: 0, False: 689]
  ------------------
  282|      0|        BNerr(BN_F_BN_EXPAND_INTERNAL, ERR_R_MALLOC_FAILURE);
  ------------------
  |  |  102|      0|# define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |   29|      0|#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
  |  |  ------------------
  ------------------
  283|      0|        return NULL;
  284|      0|    }
  285|       |
  286|    689|    assert(b->top <= words);
  287|    689|    if (b->top > 0)
  ------------------
  |  Branch (287:9): [True: 410, False: 279]
  ------------------
  288|    410|        memcpy(a, b->d, sizeof(*a) * b->top);
  289|       |
  290|    689|    return a;
  291|    689|}

bn_lib.c:bn_expand:
  678|  9.77k|{
  679|  9.77k|    if (bits > (INT_MAX - BN_BITS2 + 1))
  ------------------
  |  |   48|  9.77k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|  9.77k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  |  Branch (679:9): [True: 0, False: 9.77k]
  ------------------
  680|      0|        return NULL;
  681|       |
  682|  9.77k|    if (((bits+BN_BITS2-1)/BN_BITS2) <= (a)->dmax)
  ------------------
  |  |   48|  9.77k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|  9.77k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
                  if (((bits+BN_BITS2-1)/BN_BITS2) <= (a)->dmax)
  ------------------
  |  |   48|  9.77k|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|  9.77k|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  |  Branch (682:9): [True: 9.76k, False: 4]
  ------------------
  683|  9.76k|        return a;
  684|       |
  685|      4|    return bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2);
  ------------------
  |  |   48|      4|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|      4|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
                  return bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2);
  ------------------
  |  |   48|      4|# define BN_BITS2       (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   32|      4|#  define BN_BYTES        8
  |  |  ------------------
  ------------------
  686|  9.77k|}

bn_sub_part_words:
   30|  2.16M|{
   31|  2.16M|    BN_ULONG c, t;
  ------------------
  |  |   31|  2.16M|#  define BN_ULONG        unsigned long
  ------------------
   32|       |
   33|  2.16M|    assert(cl >= 0);
   34|  2.16M|    c = bn_sub_words(r, a, b, cl);
   35|       |
   36|  2.16M|    if (dl == 0)
  ------------------
  |  Branch (36:9): [True: 2.15M, False: 3.36k]
  ------------------
   37|  2.15M|        return c;
   38|       |
   39|  3.36k|    r += cl;
   40|  3.36k|    a += cl;
   41|  3.36k|    b += cl;
   42|       |
   43|  3.36k|    if (dl < 0) {
  ------------------
  |  Branch (43:9): [True: 422, False: 2.94k]
  ------------------
   44|  10.0k|        for (;;) {
   45|  10.0k|            t = b[0];
   46|  10.0k|            r[0] = (0 - t - c) & BN_MASK2;
  ------------------
  |  |   87|  10.0k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   47|  10.0k|            if (t != 0)
  ------------------
  |  Branch (47:17): [True: 0, False: 10.0k]
  ------------------
   48|      0|                c = 1;
   49|  10.0k|            if (++dl >= 0)
  ------------------
  |  Branch (49:17): [True: 126, False: 9.88k]
  ------------------
   50|    126|                break;
   51|       |
   52|  9.88k|            t = b[1];
   53|  9.88k|            r[1] = (0 - t - c) & BN_MASK2;
  ------------------
  |  |   87|  9.88k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   54|  9.88k|            if (t != 0)
  ------------------
  |  Branch (54:17): [True: 0, False: 9.88k]
  ------------------
   55|      0|                c = 1;
   56|  9.88k|            if (++dl >= 0)
  ------------------
  |  Branch (56:17): [True: 91, False: 9.79k]
  ------------------
   57|     91|                break;
   58|       |
   59|  9.79k|            t = b[2];
   60|  9.79k|            r[2] = (0 - t - c) & BN_MASK2;
  ------------------
  |  |   87|  9.79k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   61|  9.79k|            if (t != 0)
  ------------------
  |  Branch (61:17): [True: 0, False: 9.79k]
  ------------------
   62|      0|                c = 1;
   63|  9.79k|            if (++dl >= 0)
  ------------------
  |  Branch (63:17): [True: 159, False: 9.63k]
  ------------------
   64|    159|                break;
   65|       |
   66|  9.63k|            t = b[3];
   67|  9.63k|            r[3] = (0 - t - c) & BN_MASK2;
  ------------------
  |  |   87|  9.63k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   68|  9.63k|            if (t != 0)
  ------------------
  |  Branch (68:17): [True: 0, False: 9.63k]
  ------------------
   69|      0|                c = 1;
   70|  9.63k|            if (++dl >= 0)
  ------------------
  |  Branch (70:17): [True: 46, False: 9.58k]
  ------------------
   71|     46|                break;
   72|       |
   73|  9.58k|            b += 4;
   74|  9.58k|            r += 4;
   75|  9.58k|        }
   76|  2.94k|    } else {
   77|  2.94k|        int save_dl = dl;
   78|  4.49k|        while (c) {
  ------------------
  |  Branch (78:16): [True: 1.80k, False: 2.69k]
  ------------------
   79|  1.80k|            t = a[0];
   80|  1.80k|            r[0] = (t - c) & BN_MASK2;
  ------------------
  |  |   87|  1.80k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   81|  1.80k|            if (t != 0)
  ------------------
  |  Branch (81:17): [True: 491, False: 1.30k]
  ------------------
   82|    491|                c = 0;
   83|  1.80k|            if (--dl <= 0)
  ------------------
  |  Branch (83:17): [True: 62, False: 1.73k]
  ------------------
   84|     62|                break;
   85|       |
   86|  1.73k|            t = a[1];
   87|  1.73k|            r[1] = (t - c) & BN_MASK2;
  ------------------
  |  |   87|  1.73k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   88|  1.73k|            if (t != 0)
  ------------------
  |  Branch (88:17): [True: 483, False: 1.25k]
  ------------------
   89|    483|                c = 0;
   90|  1.73k|            if (--dl <= 0)
  ------------------
  |  Branch (90:17): [True: 56, False: 1.68k]
  ------------------
   91|     56|                break;
   92|       |
   93|  1.68k|            t = a[2];
   94|  1.68k|            r[2] = (t - c) & BN_MASK2;
  ------------------
  |  |   87|  1.68k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
   95|  1.68k|            if (t != 0)
  ------------------
  |  Branch (95:17): [True: 476, False: 1.20k]
  ------------------
   96|    476|                c = 0;
   97|  1.68k|            if (--dl <= 0)
  ------------------
  |  Branch (97:17): [True: 92, False: 1.59k]
  ------------------
   98|     92|                break;
   99|       |
  100|  1.59k|            t = a[3];
  101|  1.59k|            r[3] = (t - c) & BN_MASK2;
  ------------------
  |  |   87|  1.59k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  102|  1.59k|            if (t != 0)
  ------------------
  |  Branch (102:17): [True: 446, False: 1.14k]
  ------------------
  103|    446|                c = 0;
  104|  1.59k|            if (--dl <= 0)
  ------------------
  |  Branch (104:17): [True: 40, False: 1.55k]
  ------------------
  105|     40|                break;
  106|       |
  107|  1.55k|            save_dl = dl;
  108|  1.55k|            a += 4;
  109|  1.55k|            r += 4;
  110|  1.55k|        }
  111|  2.94k|        if (dl > 0) {
  ------------------
  |  Branch (111:13): [True: 2.69k, False: 250]
  ------------------
  112|  2.69k|            if (save_dl > dl) {
  ------------------
  |  Branch (112:17): [True: 0, False: 2.69k]
  ------------------
  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 thru */
  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 thru */
  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.69k|        }
  133|  2.94k|        if (dl > 0) {
  ------------------
  |  Branch (133:13): [True: 2.69k, False: 250]
  ------------------
  134|  94.1k|            for (;;) {
  135|  94.1k|                r[0] = a[0];
  136|  94.1k|                if (--dl <= 0)
  ------------------
  |  Branch (136:21): [True: 465, False: 93.7k]
  ------------------
  137|    465|                    break;
  138|  93.7k|                r[1] = a[1];
  139|  93.7k|                if (--dl <= 0)
  ------------------
  |  Branch (139:21): [True: 349, False: 93.3k]
  ------------------
  140|    349|                    break;
  141|  93.3k|                r[2] = a[2];
  142|  93.3k|                if (--dl <= 0)
  ------------------
  |  Branch (142:21): [True: 1.17k, False: 92.1k]
  ------------------
  143|  1.17k|                    break;
  144|  92.1k|                r[3] = a[3];
  145|  92.1k|                if (--dl <= 0)
  ------------------
  |  Branch (145:21): [True: 705, False: 91.4k]
  ------------------
  146|    705|                    break;
  147|       |
  148|  91.4k|                a += 4;
  149|  91.4k|                r += 4;
  150|  91.4k|            }
  151|  2.69k|        }
  152|  2.94k|    }
  153|  3.36k|    return c;
  154|  3.36k|}
bn_mul_recursive:
  177|  1.17M|{
  178|  1.17M|    int n = n2 / 2, c1, c2;
  179|  1.17M|    int tna = n + dna, tnb = n + dnb;
  180|  1.17M|    unsigned int neg, zero;
  181|  1.17M|    BN_ULONG ln, lo, *p;
  ------------------
  |  |   31|  1.17M|#  define BN_ULONG        unsigned long
  ------------------
  182|       |
  183|  1.17M|# 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.17M|    if (n2 == 8 && dna == 0 && dnb == 0) {
  ------------------
  |  Branch (194:9): [True: 176, False: 1.17M]
  |  Branch (194:20): [True: 161, False: 15]
  |  Branch (194:32): [True: 111, False: 50]
  ------------------
  195|    111|        bn_mul_comba8(r, a, b);
  196|    111|        return;
  197|    111|    }
  198|  1.17M|# endif                         /* BN_MUL_COMBA */
  199|       |    /* Else do normal multiply */
  200|  1.17M|    if (n2 < BN_MUL_RECURSIVE_SIZE_NORMAL) {
  ------------------
  |  |  355|  1.17M|# define BN_MUL_RECURSIVE_SIZE_NORMAL            (16)/* 32 less than */
  ------------------
  |  Branch (200:9): [True: 65, False: 1.17M]
  ------------------
  201|     65|        bn_mul_normal(r, a, n2 + dna, b, n2 + dnb);
  202|     65|        if ((dna + dnb) < 0)
  ------------------
  |  Branch (202:13): [True: 65, False: 0]
  ------------------
  203|     65|            memset(&r[2 * n2 + dna + dnb], 0,
  204|     65|                   sizeof(BN_ULONG) * -(dna + dnb));
  205|     65|        return;
  206|     65|    }
  207|       |    /* r=(a[0]-a[1])*(b[1]-b[0]) */
  208|  1.17M|    c1 = bn_cmp_part_words(a, &(a[n]), tna, n - tna);
  209|  1.17M|    c2 = bn_cmp_part_words(&(b[n]), b, tnb, tnb - n);
  210|  1.17M|    zero = neg = 0;
  211|  1.17M|    switch (c1 * 3 + c2) {
  ------------------
  |  Branch (211:13): [True: 0, False: 1.17M]
  ------------------
  212|   243k|    case -4:
  ------------------
  |  Branch (212:5): [True: 243k, False: 928k]
  ------------------
  213|   243k|        bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */
  214|   243k|        bn_sub_part_words(&(t[n]), b, &(b[n]), tnb, n - tnb); /* - */
  215|   243k|        break;
  216|  38.9k|    case -3:
  ------------------
  |  Branch (216:5): [True: 38.9k, False: 1.13M]
  ------------------
  217|  38.9k|        zero = 1;
  218|  38.9k|        break;
  219|   205k|    case -2:
  ------------------
  |  Branch (219:5): [True: 205k, False: 966k]
  ------------------
  220|   205k|        bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */
  221|   205k|        bn_sub_part_words(&(t[n]), &(b[n]), b, tnb, tnb - n); /* + */
  222|   205k|        neg = 1;
  223|   205k|        break;
  224|    356|    case -1:
  ------------------
  |  Branch (224:5): [True: 356, False: 1.17M]
  ------------------
  225|  11.3k|    case 0:
  ------------------
  |  Branch (225:5): [True: 11.0k, False: 1.16M]
  ------------------
  226|  11.8k|    case 1:
  ------------------
  |  Branch (226:5): [True: 435, False: 1.17M]
  ------------------
  227|  11.8k|        zero = 1;
  228|  11.8k|        break;
  229|   354k|    case 2:
  ------------------
  |  Branch (229:5): [True: 354k, False: 817k]
  ------------------
  230|   354k|        bn_sub_part_words(t, a, &(a[n]), tna, n - tna); /* + */
  231|   354k|        bn_sub_part_words(&(t[n]), b, &(b[n]), tnb, n - tnb); /* - */
  232|   354k|        neg = 1;
  233|   354k|        break;
  234|  42.6k|    case 3:
  ------------------
  |  Branch (234:5): [True: 42.6k, False: 1.12M]
  ------------------
  235|  42.6k|        zero = 1;
  236|  42.6k|        break;
  237|   275k|    case 4:
  ------------------
  |  Branch (237:5): [True: 275k, False: 896k]
  ------------------
  238|   275k|        bn_sub_part_words(t, a, &(a[n]), tna, n - tna);
  239|   275k|        bn_sub_part_words(&(t[n]), &(b[n]), b, tnb, tnb - n);
  240|   275k|        break;
  241|  1.17M|    }
  242|       |
  243|  1.17M|# ifdef BN_MUL_COMBA
  244|  1.17M|    if (n == 4 && dna == 0 && dnb == 0) { /* XXX: bn_mul_comba4 could take
  ------------------
  |  Branch (244:9): [True: 0, False: 1.17M]
  |  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.17M|    } else if (n == 8 && dna == 0 && dnb == 0) { /* XXX: bn_mul_comba8 could
  ------------------
  |  Branch (253:16): [True: 772k, False: 400k]
  |  Branch (253:26): [True: 772k, False: 14]
  |  Branch (253:38): [True: 771k, False: 48]
  ------------------
  254|       |                                                  * take extra args to do
  255|       |                                                  * this well */
  256|   771k|        if (!zero)
  ------------------
  |  Branch (256:13): [True: 709k, False: 62.4k]
  ------------------
  257|   709k|            bn_mul_comba8(&(t[n2]), t, &(t[n]));
  258|  62.4k|        else
  259|  62.4k|            memset(&t[n2], 0, sizeof(*t) * 16);
  260|       |
  261|   771k|        bn_mul_comba8(r, a, b);
  262|   771k|        bn_mul_comba8(&(r[n2]), &(a[n]), &(b[n]));
  263|   771k|    } else
  264|   400k|# endif                         /* BN_MUL_COMBA */
  265|   400k|    {
  266|   400k|        p = &(t[n2 * 2]);
  267|   400k|        if (!zero)
  ------------------
  |  Branch (267:13): [True: 369k, False: 30.9k]
  ------------------
  268|   369k|            bn_mul_recursive(&(t[n2]), t, &(t[n]), n, 0, 0, p);
  269|  30.9k|        else
  270|  30.9k|            memset(&t[n2], 0, sizeof(*t) * n2);
  271|   400k|        bn_mul_recursive(r, a, b, n, 0, 0, p);
  272|   400k|        bn_mul_recursive(&(r[n2]), &(a[n]), &(b[n]), n, dna, dnb, p);
  273|   400k|    }
  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.17M|    c1 = (int)(bn_add_words(t, r, &(r[n2]), n2));
  282|       |
  283|  1.17M|    if (neg) {                  /* if t[32] is negative */
  ------------------
  |  Branch (283:9): [True: 559k, False: 612k]
  ------------------
  284|   559k|        c1 -= (int)(bn_sub_words(&(t[n2]), t, &(t[n2]), n2));
  285|   612k|    } else {
  286|       |        /* Might have a carry */
  287|   612k|        c1 += (int)(bn_add_words(&(t[n2]), &(t[n2]), t, n2));
  288|   612k|    }
  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.17M|    c1 += (int)(bn_add_words(&(r[n]), &(r[n]), &(t[n2]), n2));
  297|  1.17M|    if (c1) {
  ------------------
  |  Branch (297:9): [True: 433k, False: 738k]
  ------------------
  298|   433k|        p = &(r[n + n2]);
  299|   433k|        lo = *p;
  300|   433k|        ln = (lo + c1) & BN_MASK2;
  ------------------
  |  |   87|   433k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  301|   433k|        *p = ln;
  302|       |
  303|       |        /*
  304|       |         * The overflow will stop before we over write words we should not
  305|       |         * overwrite
  306|       |         */
  307|   433k|        if (ln < (BN_ULONG)c1) {
  ------------------
  |  Branch (307:13): [True: 1.33k, False: 432k]
  ------------------
  308|  8.83k|            do {
  309|  8.83k|                p++;
  310|  8.83k|                lo = *p;
  311|  8.83k|                ln = (lo + 1) & BN_MASK2;
  ------------------
  |  |   87|  8.83k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  312|  8.83k|                *p = ln;
  313|  8.83k|            } while (ln == 0);
  ------------------
  |  Branch (313:22): [True: 7.50k, False: 1.33k]
  ------------------
  314|  1.33k|        }
  315|   433k|    }
  316|  1.17M|}
bn_mul_part_recursive:
  324|  1.59k|{
  325|  1.59k|    int i, j, n2 = n * 2;
  326|  1.59k|    int c1, c2, neg;
  327|  1.59k|    BN_ULONG ln, lo, *p;
  ------------------
  |  |   31|  1.59k|#  define BN_ULONG        unsigned long
  ------------------
  328|       |
  329|  1.59k|    if (n < 8) {
  ------------------
  |  Branch (329:9): [True: 0, False: 1.59k]
  ------------------
  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.59k|    c1 = bn_cmp_part_words(a, &(a[n]), tna, n - tna);
  336|  1.59k|    c2 = bn_cmp_part_words(&(b[n]), b, tnb, tnb - n);
  337|  1.59k|    neg = 0;
  338|  1.59k|    switch (c1 * 3 + c2) {
  ------------------
  |  Branch (338:13): [True: 0, False: 1.59k]
  ------------------
  339|     79|    case -4:
  ------------------
  |  Branch (339:5): [True: 79, False: 1.51k]
  ------------------
  340|     79|        bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */
  341|     79|        bn_sub_part_words(&(t[n]), b, &(b[n]), tnb, n - tnb); /* - */
  342|     79|        break;
  343|     12|    case -3:
  ------------------
  |  Branch (343:5): [True: 12, False: 1.58k]
  ------------------
  344|     98|    case -2:
  ------------------
  |  Branch (344:5): [True: 86, False: 1.51k]
  ------------------
  345|     98|        bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */
  346|     98|        bn_sub_part_words(&(t[n]), &(b[n]), b, tnb, tnb - n); /* + */
  347|     98|        neg = 1;
  348|     98|        break;
  349|     19|    case -1:
  ------------------
  |  Branch (349:5): [True: 19, False: 1.57k]
  ------------------
  350|     30|    case 0:
  ------------------
  |  Branch (350:5): [True: 11, False: 1.58k]
  ------------------
  351|     46|    case 1:
  ------------------
  |  Branch (351:5): [True: 16, False: 1.58k]
  ------------------
  352|  1.30k|    case 2:
  ------------------
  |  Branch (352:5): [True: 1.26k, False: 333]
  ------------------
  353|  1.30k|        bn_sub_part_words(t, a, &(a[n]), tna, n - tna); /* + */
  354|  1.30k|        bn_sub_part_words(&(t[n]), b, &(b[n]), tnb, n - tnb); /* - */
  355|  1.30k|        neg = 1;
  356|  1.30k|        break;
  357|     13|    case 3:
  ------------------
  |  Branch (357:5): [True: 13, False: 1.58k]
  ------------------
  358|    110|    case 4:
  ------------------
  |  Branch (358:5): [True: 97, False: 1.49k]
  ------------------
  359|    110|        bn_sub_part_words(t, a, &(a[n]), tna, n - tna);
  360|    110|        bn_sub_part_words(&(t[n]), &(b[n]), b, tnb, tnb - n);
  361|    110|        break;
  362|  1.59k|    }
  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.59k|    if (n == 8) {
  ------------------
  |  Branch (375:9): [True: 272, False: 1.32k]
  ------------------
  376|    272|        bn_mul_comba8(&(t[n2]), t, &(t[n]));
  377|    272|        bn_mul_comba8(r, a, b);
  378|    272|        bn_mul_normal(&(r[n2]), &(a[n]), tna, &(b[n]), tnb);
  379|    272|        memset(&r[n2 + tna + tnb], 0, sizeof(*r) * (n2 - tna - tnb));
  380|  1.32k|    } else {
  381|  1.32k|        p = &(t[n2 * 2]);
  382|  1.32k|        bn_mul_recursive(&(t[n2]), t, &(t[n]), n, 0, 0, p);
  383|  1.32k|        bn_mul_recursive(r, a, b, n, 0, 0, p);
  384|  1.32k|        i = n / 2;
  385|       |        /*
  386|       |         * If there is only a bottom half to the number, just do it
  387|       |         */
  388|  1.32k|        if (tna > tnb)
  ------------------
  |  Branch (388:13): [True: 737, False: 587]
  ------------------
  389|    737|            j = tna - i;
  390|    587|        else
  391|    587|            j = tnb - i;
  392|  1.32k|        if (j == 0) {
  ------------------
  |  Branch (392:13): [True: 15, False: 1.30k]
  ------------------
  393|     15|            bn_mul_recursive(&(r[n2]), &(a[n]), &(b[n]),
  394|     15|                             i, tna - i, tnb - i, p);
  395|     15|            memset(&r[n2 + i * 2], 0, sizeof(*r) * (n2 - i * 2));
  396|  1.30k|        } else if (j > 0) {     /* eg, n == 16, i == 8 and tn == 11 */
  ------------------
  |  Branch (396:20): [True: 680, False: 629]
  ------------------
  397|    680|            bn_mul_part_recursive(&(r[n2]), &(a[n]), &(b[n]),
  398|    680|                                  i, tna - i, tnb - i, p);
  399|    680|            memset(&(r[n2 + tna + tnb]), 0,
  400|    680|                   sizeof(BN_ULONG) * (n2 - tna - tnb));
  401|    680|        } else {                /* (j < 0) eg, n == 16, i == 8 and tn == 5 */
  402|       |
  403|    629|            memset(&r[n2], 0, sizeof(*r) * n2);
  404|    629|            if (tna < BN_MUL_RECURSIVE_SIZE_NORMAL
  ------------------
  |  |  355|  1.25k|# define BN_MUL_RECURSIVE_SIZE_NORMAL            (16)/* 32 less than */
  ------------------
  |  Branch (404:17): [True: 554, False: 75]
  ------------------
  405|    629|                && tnb < BN_MUL_RECURSIVE_SIZE_NORMAL) {
  ------------------
  |  |  355|    554|# define BN_MUL_RECURSIVE_SIZE_NORMAL            (16)/* 32 less than */
  ------------------
  |  Branch (405:20): [True: 550, False: 4]
  ------------------
  406|    550|                bn_mul_normal(&(r[n2]), &(a[n]), tna, &(b[n]), tnb);
  407|    550|            } else {
  408|    141|                for (;;) {
  409|    141|                    i /= 2;
  410|       |                    /*
  411|       |                     * these simplified conditions work exclusively because
  412|       |                     * difference between tna and tnb is 1 or 0
  413|       |                     */
  414|    141|                    if (i < tna || i < tnb) {
  ------------------
  |  Branch (414:25): [True: 61, False: 80]
  |  Branch (414:36): [True: 2, False: 78]
  ------------------
  415|     63|                        bn_mul_part_recursive(&(r[n2]),
  416|     63|                                              &(a[n]), &(b[n]),
  417|     63|                                              i, tna - i, tnb - i, p);
  418|     63|                        break;
  419|     78|                    } else if (i == tna || i == tnb) {
  ------------------
  |  Branch (419:32): [True: 12, False: 66]
  |  Branch (419:44): [True: 4, False: 62]
  ------------------
  420|     16|                        bn_mul_recursive(&(r[n2]),
  421|     16|                                         &(a[n]), &(b[n]),
  422|     16|                                         i, tna - i, tnb - i, p);
  423|     16|                        break;
  424|     16|                    }
  425|    141|                }
  426|     79|            }
  427|    629|        }
  428|  1.32k|    }
  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.59k|    c1 = (int)(bn_add_words(t, r, &(r[n2]), n2));
  437|       |
  438|  1.59k|    if (neg) {                  /* if t[32] is negative */
  ------------------
  |  Branch (438:9): [True: 1.40k, False: 189]
  ------------------
  439|  1.40k|        c1 -= (int)(bn_sub_words(&(t[n2]), t, &(t[n2]), n2));
  440|  1.40k|    } else {
  441|       |        /* Might have a carry */
  442|    189|        c1 += (int)(bn_add_words(&(t[n2]), &(t[n2]), t, n2));
  443|    189|    }
  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.59k|    c1 += (int)(bn_add_words(&(r[n]), &(r[n]), &(t[n2]), n2));
  452|  1.59k|    if (c1) {
  ------------------
  |  Branch (452:9): [True: 235, False: 1.36k]
  ------------------
  453|    235|        p = &(r[n + n2]);
  454|    235|        lo = *p;
  455|    235|        ln = (lo + c1) & BN_MASK2;
  ------------------
  |  |   87|    235|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  456|    235|        *p = ln;
  457|       |
  458|       |        /*
  459|       |         * The overflow will stop before we over write words we should not
  460|       |         * overwrite
  461|       |         */
  462|    235|        if (ln < (BN_ULONG)c1) {
  ------------------
  |  Branch (462:13): [True: 87, False: 148]
  ------------------
  463|  2.77k|            do {
  464|  2.77k|                p++;
  465|  2.77k|                lo = *p;
  466|  2.77k|                ln = (lo + 1) & BN_MASK2;
  ------------------
  |  |   87|  2.77k|#  define BN_MASK2        (0xffffffffffffffffL)
  ------------------
  467|  2.77k|                *p = ln;
  468|  2.77k|            } while (ln == 0);
  ------------------
  |  Branch (468:22): [True: 2.68k, False: 87]
  ------------------
  469|     87|        }
  470|    235|    }
  471|  1.59k|}
BN_mul:
  498|  2.72k|{
  499|  2.72k|    int ret = bn_mul_fixed_top(r, a, b, ctx);
  500|       |
  501|  2.72k|    bn_correct_top(r);
  502|  2.72k|    bn_check_top(r);
  503|       |
  504|  2.72k|    return ret;
  505|  2.72k|}
bn_mul_fixed_top:
  508|  2.72k|{
  509|  2.72k|    int ret = 0;
  510|  2.72k|    int top, al, bl;
  511|  2.72k|    BIGNUM *rr;
  512|  2.72k|#if defined(BN_MUL_COMBA) || defined(BN_RECURSION)
  513|  2.72k|    int i;
  514|  2.72k|#endif
  515|  2.72k|#ifdef BN_RECURSION
  516|  2.72k|    BIGNUM *t = NULL;
  517|  2.72k|    int j = 0, k;
  518|  2.72k|#endif
  519|       |
  520|  2.72k|    bn_check_top(a);
  521|  2.72k|    bn_check_top(b);
  522|  2.72k|    bn_check_top(r);
  523|       |
  524|  2.72k|    al = a->top;
  525|  2.72k|    bl = b->top;
  526|       |
  527|  2.72k|    if ((al == 0) || (bl == 0)) {
  ------------------
  |  Branch (527:9): [True: 508, False: 2.21k]
  |  Branch (527:22): [True: 0, False: 2.21k]
  ------------------
  528|    508|        BN_zero(r);
  ------------------
  |  |  196|    508|#  define BN_zero(a)      (BN_set_word((a),0))
  ------------------
  529|    508|        return 1;
  530|    508|    }
  531|  2.21k|    top = al + bl;
  532|       |
  533|  2.21k|    BN_CTX_start(ctx);
  534|  2.21k|    if ((r == a) || (r == b)) {
  ------------------
  |  Branch (534:9): [True: 0, False: 2.21k]
  |  Branch (534:21): [True: 0, False: 2.21k]
  ------------------
  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.21k|        rr = r;
  539|       |
  540|  2.21k|#if defined(BN_MUL_COMBA) || defined(BN_RECURSION)
  541|  2.21k|    i = al - bl;
  542|  2.21k|#endif
  543|  2.21k|#ifdef BN_MUL_COMBA
  544|  2.21k|    if (i == 0) {
  ------------------
  |  Branch (544:9): [True: 683, False: 1.53k]
  ------------------
  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|    683|        if (al == 8) {
  ------------------
  |  Branch (554:13): [True: 1, False: 682]
  ------------------
  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|    683|    }
  562|  2.21k|#endif                          /* BN_MUL_COMBA */
  563|  2.21k|#ifdef BN_RECURSION
  564|  2.21k|    if ((al >= BN_MULL_SIZE_NORMAL) && (bl >= BN_MULL_SIZE_NORMAL)) {
  ------------------
  |  |  354|  2.21k|# define BN_MULL_SIZE_NORMAL                     (16)/* 32 */
  ------------------
                  if ((al >= BN_MULL_SIZE_NORMAL) && (bl >= BN_MULL_SIZE_NORMAL)) {
  ------------------
  |  |  354|  1.35k|# define BN_MULL_SIZE_NORMAL                     (16)/* 32 */
  ------------------
  |  Branch (564:9): [True: 1.35k, False: 866]
  |  Branch (564:40): [True: 1.20k, False: 143]
  ------------------
  565|  1.20k|        if (i >= -1 && i <= 1) {
  ------------------
  |  Branch (565:13): [True: 1.17k, False: 37]
  |  Branch (565:24): [True: 1.09k, False: 80]
  ------------------
  566|       |            /*
  567|       |             * Find out the power of two lower or equal to the longest of the
  568|       |             * two numbers
  569|       |             */
  570|  1.09k|            if (i >= 0) {
  ------------------
  |  Branch (570:17): [True: 990, False: 100]
  ------------------
  571|    990|                j = BN_num_bits_word((BN_ULONG)al);
  572|    990|            }
  573|  1.09k|            if (i == -1) {
  ------------------
  |  Branch (573:17): [True: 100, False: 990]
  ------------------
  574|    100|                j = BN_num_bits_word((BN_ULONG)bl);
  575|    100|            }
  576|  1.09k|            j = 1 << (j - 1);
  577|  1.09k|            assert(j <= al || j <= bl);
  578|  1.09k|            k = j + j;
  579|  1.09k|            t = BN_CTX_get(ctx);
  580|  1.09k|            if (t == NULL)
  ------------------
  |  Branch (580:17): [True: 0, False: 1.09k]
  ------------------
  581|      0|                goto err;
  582|  1.09k|            if (al > j || bl > j) {
  ------------------
  |  Branch (582:17): [True: 832, False: 258]
  |  Branch (582:27): [True: 21, False: 237]
  ------------------
  583|    853|                if (bn_wexpand(t, k * 4) == NULL)
  ------------------
  |  Branch (583:21): [True: 0, False: 853]
  ------------------
  584|      0|                    goto err;
  585|    853|                if (bn_wexpand(rr, k * 4) == NULL)
  ------------------
  |  Branch (585:21): [True: 0, False: 853]
  ------------------
  586|      0|                    goto err;
  587|    853|                bn_mul_part_recursive(rr->d, a->d, b->d,
  588|    853|                                      j, al - j, bl - j, t->d);
  589|    853|            } else {            /* al <= j || bl <= j */
  590|       |
  591|    237|                if (bn_wexpand(t, k * 2) == NULL)
  ------------------
  |  Branch (591:21): [True: 0, False: 237]
  ------------------
  592|      0|                    goto err;
  593|    237|                if (bn_wexpand(rr, k * 2) == NULL)
  ------------------
  |  Branch (593:21): [True: 0, False: 237]
  ------------------
  594|      0|                    goto err;
  595|    237|                bn_mul_recursive(rr->d, a->d, b->d, j, al - j, bl - j, t->d);
  596|    237|            }
  597|  1.09k|            rr->top = top;
  598|  1.09k|            goto end;
  599|  1.09k|        }
  600|  1.20k|    }
  601|  1.12k|#endif                          /* BN_RECURSION */
  602|  1.12k|    if (bn_wexpand(rr, top) == NULL)
  ------------------
  |  Branch (602:9): [True: 0, False: 1.12k]
  ------------------
  603|      0|        goto err;
  604|  1.12k|    rr->top = top;
  605|  1.12k|    bn_mul_normal(rr->d, a->d, al, b->d, bl);
  606|       |
  607|  1.12k|#if defined(BN_MUL_COMBA) || defined(BN_RECURSION)
  608|  2.21k| end:
  609|  2.21k|#endif
  610|  2.21k|    rr->neg = a->neg ^ b->neg;
  611|  2.21k|    rr->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  219|  2.21k|#  define BN_FLG_FIXED_TOP 0
  ------------------
  612|  2.21k|    if (r != rr && BN_copy(r, rr) == NULL)
  ------------------
  |  Branch (612:9): [True: 0, False: 2.21k]
  |  Branch (612:20): [True: 0, False: 0]
  ------------------
  613|      0|        goto err;
  614|       |
  615|  2.21k|    ret = 1;
  616|  2.21k| err:
  617|  2.21k|    bn_check_top(r);
  618|  2.21k|    BN_CTX_end(ctx);
  619|  2.21k|    return ret;
  620|  2.21k|}
bn_mul_normal:
  623|  2.01k|{
  624|  2.01k|    BN_ULONG *rr;
  ------------------
  |  |   31|  2.01k|#  define BN_ULONG        unsigned long
  ------------------
  625|       |
  626|  2.01k|    if (na < nb) {
  ------------------
  |  Branch (626:9): [True: 638, False: 1.37k]
  ------------------
  627|    638|        int itmp;
  628|    638|        BN_ULONG *ltmp;
  ------------------
  |  |   31|    638|#  define BN_ULONG        unsigned long
  ------------------
  629|       |
  630|    638|        itmp = na;
  631|    638|        na = nb;
  632|    638|        nb = itmp;
  633|    638|        ltmp = a;
  634|    638|        a = b;
  635|    638|        b = ltmp;
  636|       |
  637|    638|    }
  638|  2.01k|    rr = &(r[na]);
  639|  2.01k|    if (nb <= 0) {
  ------------------
  |  Branch (639:9): [True: 468, False: 1.54k]
  ------------------
  640|    468|        (void)bn_mul_words(r, a, na, 0);
  641|    468|        return;
  642|    468|    } else
  643|  1.54k|        rr[0] = bn_mul_words(r, a, na, b[0]);
  644|       |
  645|  17.6k|    for (;;) {
  646|  17.6k|        if (--nb <= 0)
  ------------------
  |  Branch (646:13): [True: 1.10k, False: 16.5k]
  ------------------
  647|  1.10k|            return;
  648|  16.5k|        rr[1] = bn_mul_add_words(&(r[1]), a, na, b[1]);
  649|  16.5k|        if (--nb <= 0)
  ------------------
  |  Branch (649:13): [True: 205, False: 16.3k]
  ------------------
  650|    205|            return;
  651|  16.3k|        rr[2] = bn_mul_add_words(&(r[2]), a, na, b[2]);
  652|  16.3k|        if (--nb <= 0)
  ------------------
  |  Branch (652:13): [True: 134, False: 16.2k]
  ------------------
  653|    134|            return;
  654|  16.2k|        rr[3] = bn_mul_add_words(&(r[3]), a, na, b[3]);
  655|  16.2k|        if (--nb <= 0)
  ------------------
  |  Branch (655:13): [True: 102, False: 16.1k]
  ------------------
  656|    102|            return;
  657|  16.1k|        rr[4] = bn_mul_add_words(&(r[4]), a, na, b[4]);
  658|  16.1k|        rr += 4;
  659|  16.1k|        r += 4;
  660|  16.1k|        b += 4;
  661|  16.1k|    }
  662|  1.54k|}

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

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

ERR_load_CMS_strings:
  291|      2|{
  292|      2|#ifndef OPENSSL_NO_ERR
  293|      2|    if (ERR_func_error_string(CMS_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (293:9): [True: 2, False: 0]
  ------------------
  294|      2|        ERR_load_strings_const(CMS_str_functs);
  295|      2|        ERR_load_strings_const(CMS_str_reasons);
  296|      2|    }
  297|      2|#endif
  298|      2|    return 1;
  299|      2|}

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

ERR_load_CONF_strings:
   87|      2|{
   88|      2|#ifndef OPENSSL_NO_ERR
   89|      2|    if (ERR_func_error_string(CONF_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (89:9): [True: 2, False: 0]
  ------------------
   90|      2|        ERR_load_strings_const(CONF_str_functs);
   91|      2|        ERR_load_strings_const(CONF_str_reasons);
   92|      2|    }
   93|      2|#endif
   94|      2|    return 1;
   95|      2|}

CONF_modules_unload:
  360|      2|{
  361|      2|    int i;
  362|      2|    CONF_MODULE *md;
  363|      2|    CONF_modules_finish();
  364|       |    /* unload modules in reverse order */
  365|      2|    for (i = sk_CONF_MODULE_num(supported_modules) - 1; i >= 0; i--) {
  ------------------
  |  Branch (365:57): [True: 0, False: 2]
  ------------------
  366|      0|        md = sk_CONF_MODULE_value(supported_modules, i);
  367|       |        /* If static or in use and 'all' not set ignore it */
  368|      0|        if (((md->links > 0) || !md->dso) && !all)
  ------------------
  |  Branch (368:14): [True: 0, False: 0]
  |  Branch (368:33): [True: 0, False: 0]
  |  Branch (368:46): [True: 0, False: 0]
  ------------------
  369|      0|            continue;
  370|       |        /* Since we're working in reverse this is OK */
  371|      0|        (void)sk_CONF_MODULE_delete(supported_modules, i);
  372|      0|        module_free(md);
  373|      0|    }
  374|      2|    if (sk_CONF_MODULE_num(supported_modules) == 0) {
  ------------------
  |  Branch (374:9): [True: 0, False: 2]
  ------------------
  375|      0|        sk_CONF_MODULE_free(supported_modules);
  376|      0|        supported_modules = NULL;
  377|      0|    }
  378|      2|}
CONF_modules_finish:
  391|      4|{
  392|      4|    CONF_IMODULE *imod;
  393|      4|    while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
  ------------------
  |  Branch (393:12): [True: 0, False: 4]
  ------------------
  394|      0|        imod = sk_CONF_IMODULE_pop(initialized_modules);
  395|      0|        module_finish(imod);
  396|      0|    }
  397|      4|    sk_CONF_IMODULE_free(initialized_modules);
  398|      4|    initialized_modules = NULL;
  399|      4|}
conf_modules_free_int:
  427|      2|{
  428|      2|    CONF_modules_finish();
  429|      2|    CONF_modules_unload(1);
  430|      2|}

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

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

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

ossl_ctype_check:
  253|    250|{
  254|    250|    const int max = sizeof(ctype_char_map) / sizeof(*ctype_char_map);
  255|    250|    const int a = ossl_toascii(c);
  ------------------
  |  |   53|    250|#  define ossl_toascii(c)       (c)
  ------------------
  256|       |
  257|    250|    return a >= 0 && a < max && (ctype_char_map[a] & mask) != 0;
  ------------------
  |  Branch (257:12): [True: 250, False: 0]
  |  Branch (257:22): [True: 250, False: 0]
  |  Branch (257:33): [True: 0, False: 250]
  ------------------
  258|    250|}

ERR_load_DH_strings:
   94|      2|{
   95|      2|#ifndef OPENSSL_NO_ERR
   96|      2|    if (ERR_func_error_string(DH_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (96:9): [True: 2, False: 0]
  ------------------
   97|      2|        ERR_load_strings_const(DH_str_functs);
   98|      2|        ERR_load_strings_const(DH_str_reasons);
   99|      2|    }
  100|      2|#endif
  101|      2|    return 1;
  102|      2|}

ERR_load_DSA_strings:
   70|      2|{
   71|      2|#ifndef OPENSSL_NO_ERR
   72|      2|    if (ERR_func_error_string(DSA_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (72:9): [True: 2, False: 0]
  ------------------
   73|      2|        ERR_load_strings_const(DSA_str_functs);
   74|      2|        ERR_load_strings_const(DSA_str_reasons);
   75|      2|    }
   76|      2|#endif
   77|      2|    return 1;
   78|      2|}

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

ERR_load_EC_strings:
  387|      2|{
  388|      2|#ifndef OPENSSL_NO_ERR
  389|      2|    if (ERR_func_error_string(EC_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (389:9): [True: 2, False: 0]
  ------------------
  390|      2|        ERR_load_strings_const(EC_str_functs);
  391|      2|        ERR_load_strings_const(EC_str_reasons);
  392|      2|    }
  393|      2|#endif
  394|      2|    return 1;
  395|      2|}

ERR_load_ENGINE_strings:
  146|      2|{
  147|      2|#ifndef OPENSSL_NO_ERR
  148|      2|    if (ERR_func_error_string(ENGINE_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (148:9): [True: 2, False: 0]
  ------------------
  149|      2|        ERR_load_strings_const(ENGINE_str_functs);
  150|      2|        ERR_load_strings_const(ENGINE_str_reasons);
  151|      2|    }
  152|      2|#endif
  153|      2|    return 1;
  154|      2|}

engine_cleanup_int:
  169|      2|{
  170|      2|    if (int_cleanup_check(0)) {
  ------------------
  |  Branch (170:9): [True: 0, False: 2]
  ------------------
  171|      0|        sk_ENGINE_CLEANUP_ITEM_pop_free(cleanup_stack,
  172|      0|                                        engine_cleanup_cb_free);
  173|      0|        cleanup_stack = NULL;
  174|      0|    }
  175|      2|    CRYPTO_THREAD_lock_free(global_engine_lock);
  176|      2|    global_engine_lock = NULL;
  177|      2|}
eng_lib.c:int_cleanup_check:
  117|      2|{
  118|      2|    if (cleanup_stack)
  ------------------
  |  Branch (118:9): [True: 0, False: 2]
  ------------------
  119|      0|        return 1;
  120|      2|    if (!create)
  ------------------
  |  Branch (120:9): [True: 2, False: 0]
  ------------------
  121|      2|        return 0;
  122|      0|    cleanup_stack = sk_ENGINE_CLEANUP_ITEM_new_null();
  123|      0|    return (cleanup_stack ? 1 : 0);
  ------------------
  |  Branch (123:13): [True: 0, False: 0]
  ------------------
  124|      2|}

err_cleanup:
  321|      2|{
  322|      2|    if (set_err_thread_local != 0)
  ------------------
  |  Branch (322:9): [True: 2, False: 0]
  ------------------
  323|      2|        CRYPTO_THREAD_cleanup_local(&err_thread_local);
  324|      2|    CRYPTO_THREAD_lock_free(err_string_lock);
  325|      2|    err_string_lock = NULL;
  326|      2|#ifndef OPENSSL_NO_ERR
  327|      2|    lh_ERR_STRING_DATA_free(int_error_hash);
  328|      2|    int_error_hash = NULL;
  329|      2|#endif
  330|      2|}
ERR_load_ERR_strings:
  359|    118|{
  360|    118|#ifndef OPENSSL_NO_ERR
  361|    118|    if (!RUN_ONCE(&err_string_init, do_err_strings_init))
  ------------------
  |  |  119|    118|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 118, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (361:9): [True: 0, False: 118]
  ------------------
  362|      0|        return 0;
  363|       |
  364|    118|    err_load_strings(ERR_str_libraries);
  365|    118|    err_load_strings(ERR_str_reasons);
  366|    118|    err_patch(ERR_LIB_SYS, ERR_str_functs);
  ------------------
  |  |   55|    118|# define ERR_LIB_SYS             2
  ------------------
  367|    118|    err_load_strings(ERR_str_functs);
  368|    118|    build_SYS_str_reasons();
  369|    118|#endif
  370|    118|    return 1;
  371|    118|}
ERR_load_strings_const:
  387|    116|{
  388|    116|#ifndef OPENSSL_NO_ERR
  389|    116|    if (ERR_load_ERR_strings() == 0)
  ------------------
  |  Branch (389:9): [True: 0, False: 116]
  ------------------
  390|      0|        return 0;
  391|    116|    err_load_strings(str);
  392|    116|#endif
  393|       |
  394|    116|    return 1;
  395|    116|}
ERR_clear_error:
  461|  2.74k|{
  462|  2.74k|    int i;
  463|  2.74k|    ERR_STATE *es;
  464|       |
  465|  2.74k|    es = ERR_get_state();
  466|  2.74k|    if (es == NULL)
  ------------------
  |  Branch (466:9): [True: 0, False: 2.74k]
  ------------------
  467|      0|        return;
  468|       |
  469|  46.6k|    for (i = 0; i < ERR_NUM_ERRORS; i++) {
  ------------------
  |  |   42|  46.6k|# define ERR_NUM_ERRORS  16
  ------------------
  |  Branch (469:17): [True: 43.8k, False: 2.74k]
  ------------------
  470|  43.8k|        err_clear(es, i);
  ------------------
  |  |  281|  43.8k|        do { \
  |  |  282|  43.8k|            err_clear_data(p, i); \
  |  |  ------------------
  |  |  |  |  272|  43.8k|        do { \
  |  |  |  |  273|  43.8k|            if ((p)->err_data_flags[i] & ERR_TXT_MALLOCED) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  43.8k|# define ERR_TXT_MALLOCED        0x01
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (273:17): [True: 0, False: 43.8k]
  |  |  |  |  ------------------
  |  |  |  |  274|      0|                OPENSSL_free((p)->err_data[i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  128|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  275|      0|                (p)->err_data[i] = NULL; \
  |  |  |  |  276|      0|            } \
  |  |  |  |  277|  43.8k|            (p)->err_data_flags[i] = 0; \
  |  |  |  |  278|  43.8k|        } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (278:18): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  283|  43.8k|            (p)->err_flags[i] = 0; \
  |  |  284|  43.8k|            (p)->err_buffer[i] = 0; \
  |  |  285|  43.8k|            (p)->err_file[i] = NULL; \
  |  |  286|  43.8k|            (p)->err_line[i] = -1; \
  |  |  287|  43.8k|        } while (0)
  |  |  ------------------
  |  |  |  Branch (287:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  471|  43.8k|    }
  472|  2.74k|    es->top = es->bottom = 0;
  473|  2.74k|}
ERR_func_error_string:
  676|     58|{
  677|     58|#ifndef OPENSSL_NO_ERR
  678|     58|    ERR_STRING_DATA d, *p;
  679|     58|    unsigned long l, f;
  680|       |
  681|     58|    if (!RUN_ONCE(&err_string_init, do_err_strings_init)) {
  ------------------
  |  |  119|     58|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 58, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (681:9): [True: 0, False: 58]
  ------------------
  682|      0|        return NULL;
  683|      0|    }
  684|       |
  685|     58|    l = ERR_GET_LIB(e);
  ------------------
  |  |  142|     58|# define ERR_GET_LIB(l)          (int)(((l) >> 24L) & 0x0FFL)
  ------------------
  686|     58|    f = ERR_GET_FUNC(e);
  ------------------
  |  |  143|     58|# define ERR_GET_FUNC(l)         (int)(((l) >> 12L) & 0xFFFL)
  ------------------
  687|     58|    d.error = ERR_PACK(l, f, 0);
  ------------------
  |  |  138|     58|# define ERR_PACK(l,f,r) ( \
  |  |  139|     58|        (((unsigned int)(l) & 0x0FF) << 24L) | \
  |  |  140|     58|        (((unsigned int)(f) & 0xFFF) << 12L) | \
  |  |  141|     58|        (((unsigned int)(r) & 0xFFF)       ) )
  ------------------
  688|     58|    p = int_err_get_item(&d);
  689|     58|    return ((p == NULL) ? NULL : p->string);
  ------------------
  |  Branch (689:13): [True: 58, False: 0]
  ------------------
  690|       |#else
  691|       |    return NULL;
  692|       |#endif
  693|     58|}
err_delete_thread_state:
  720|      2|{
  721|      2|    ERR_STATE *state = CRYPTO_THREAD_get_local(&err_thread_local);
  722|      2|    if (state == NULL)
  ------------------
  |  Branch (722:9): [True: 0, False: 2]
  ------------------
  723|      0|        return;
  724|       |
  725|      2|    CRYPTO_THREAD_set_local(&err_thread_local, NULL);
  726|      2|    ERR_STATE_free(state);
  727|      2|}
ERR_get_state:
  748|  2.74k|{
  749|  2.74k|    ERR_STATE *state;
  750|  2.74k|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   75|  2.74k|# define get_last_sys_error()    errno
  ------------------
  751|       |
  752|  2.74k|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   28|  2.74k|# define OPENSSL_INIT_BASE_ONLY              0x00040000L
  ------------------
  |  Branch (752:9): [True: 0, False: 2.74k]
  ------------------
  753|      0|        return NULL;
  754|       |
  755|  2.74k|    if (!RUN_ONCE(&err_init, err_do_init))
  ------------------
  |  |  119|  2.74k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 2.74k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (755:9): [True: 0, False: 2.74k]
  ------------------
  756|      0|        return NULL;
  757|       |
  758|  2.74k|    state = CRYPTO_THREAD_get_local(&err_thread_local);
  759|  2.74k|    if (state == (ERR_STATE*)-1)
  ------------------
  |  Branch (759:9): [True: 0, False: 2.74k]
  ------------------
  760|      0|        return NULL;
  761|       |
  762|  2.74k|    if (state == NULL) {
  ------------------
  |  Branch (762:9): [True: 2, False: 2.74k]
  ------------------
  763|      2|        if (!CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)-1))
  ------------------
  |  Branch (763:13): [True: 0, False: 2]
  ------------------
  764|      0|            return NULL;
  765|       |
  766|      2|        if ((state = OPENSSL_zalloc(sizeof(*state))) == NULL) {
  ------------------
  |  |  120|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      2|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      2|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (766:13): [True: 0, False: 2]
  ------------------
  767|      0|            CRYPTO_THREAD_set_local(&err_thread_local, NULL);
  768|      0|            return NULL;
  769|      0|        }
  770|       |
  771|      2|        if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ERR_STATE)
  ------------------
  |  |   32|      2|# define OPENSSL_INIT_THREAD_ERR_STATE       0x02
  ------------------
  |  Branch (771:13): [True: 0, False: 2]
  ------------------
  772|      2|                || !CRYPTO_THREAD_set_local(&err_thread_local, state)) {
  ------------------
  |  Branch (772:20): [True: 0, False: 2]
  ------------------
  773|      0|            ERR_STATE_free(state);
  774|      0|            CRYPTO_THREAD_set_local(&err_thread_local, NULL);
  775|      0|            return NULL;
  776|      0|        }
  777|       |
  778|       |        /* Ignore failures from these */
  779|      2|        OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
  ------------------
  |  |  357|      2|# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS    0x00000002L
  ------------------
  780|      2|    }
  781|       |
  782|  2.74k|    set_sys_error(saveerrno);
  ------------------
  |  |   77|  2.74k|# define set_sys_error(e)        errno=(e)
  ------------------
  783|  2.74k|    return state;
  784|  2.74k|}
err.c:do_err_strings_init:
  302|      2|{
  303|      2|    if (!OPENSSL_init_crypto(0, NULL))
  ------------------
  |  Branch (303:9): [True: 0, False: 2]
  ------------------
  304|      0|        return 0;
  305|      2|    err_string_lock = CRYPTO_THREAD_lock_new();
  306|      2|    if (err_string_lock == NULL)
  ------------------
  |  Branch (306:9): [True: 0, False: 2]
  ------------------
  307|      0|        return 0;
  308|      2|#ifndef OPENSSL_NO_ERR
  309|      2|    int_error_hash = lh_ERR_STRING_DATA_new(err_string_data_hash,
  310|      2|                                            err_string_data_cmp);
  311|      2|    if (int_error_hash == NULL) {
  ------------------
  |  Branch (311:9): [True: 0, False: 2]
  ------------------
  312|      0|        CRYPTO_THREAD_lock_free(err_string_lock);
  313|      0|        err_string_lock = NULL;
  314|      0|        return 0;
  315|      0|    }
  316|      2|#endif
  317|      2|    return 1;
  318|      2|}
err.c:err_string_data_hash:
  167|  15.2k|{
  168|  15.2k|    unsigned long ret, l;
  169|       |
  170|  15.2k|    l = a->error;
  171|  15.2k|    ret = l ^ ERR_GET_LIB(l) ^ ERR_GET_FUNC(l);
  ------------------
  |  |  142|  15.2k|# define ERR_GET_LIB(l)          (int)(((l) >> 24L) & 0x0FFL)
  ------------------
                  ret = l ^ ERR_GET_LIB(l) ^ ERR_GET_FUNC(l);
  ------------------
  |  |  143|  15.2k|# define ERR_GET_FUNC(l)         (int)(((l) >> 12L) & 0xFFFL)
  ------------------
  172|  15.2k|    return (ret ^ ret % 19 * 13);
  173|  15.2k|}
err.c:err_string_data_cmp:
  177|  10.5k|{
  178|  10.5k|    if (a->error == b->error)
  ------------------
  |  Branch (178:9): [True: 10.3k, False: 246]
  ------------------
  179|  10.3k|        return 0;
  180|    246|    return a->error > b->error ? 1 : -1;
  ------------------
  |  Branch (180:12): [True: 150, False: 96]
  ------------------
  181|  10.5k|}
err.c:err_load_strings:
  348|    472|{
  349|    472|    CRYPTO_THREAD_write_lock(err_string_lock);
  350|  15.6k|    for (; str->error; str++)
  ------------------
  |  Branch (350:12): [True: 15.1k, False: 472]
  ------------------
  351|  15.1k|        (void)lh_ERR_STRING_DATA_insert(int_error_hash,
  352|  15.1k|                                       (ERR_STRING_DATA *)str);
  353|    472|    CRYPTO_THREAD_unlock(err_string_lock);
  354|    472|    return 1;
  355|    472|}
err.c:err_patch:
  337|    118|{
  338|    118|    unsigned long plib = ERR_PACK(lib, 0, 0);
  ------------------
  |  |  138|    118|# define ERR_PACK(l,f,r) ( \
  |  |  139|    118|        (((unsigned int)(l) & 0x0FF) << 24L) | \
  |  |  140|    118|        (((unsigned int)(f) & 0xFFF) << 12L) | \
  |  |  141|    118|        (((unsigned int)(r) & 0xFFF)       ) )
  ------------------
  339|       |
  340|  2.83k|    for (; str->error != 0; str++)
  ------------------
  |  Branch (340:12): [True: 2.71k, False: 118]
  ------------------
  341|  2.71k|        str->error |= plib;
  342|    118|}
err.c:build_SYS_str_reasons:
  210|    118|{
  211|       |    /* OPENSSL_malloc cannot be used here, use static storage instead */
  212|    118|    static char strerror_pool[SPACE_SYS_STR_REASONS];
  213|    118|    char *cur = strerror_pool;
  214|    118|    size_t cnt = 0;
  215|    118|    static int init = 1;
  216|    118|    int i;
  217|    118|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   75|    118|# define get_last_sys_error()    errno
  ------------------
  218|       |
  219|    118|    CRYPTO_THREAD_write_lock(err_string_lock);
  220|    118|    if (!init) {
  ------------------
  |  Branch (220:9): [True: 116, False: 2]
  ------------------
  221|    116|        CRYPTO_THREAD_unlock(err_string_lock);
  222|    116|        return;
  223|    116|    }
  224|       |
  225|    256|    for (i = 1; i <= NUM_SYS_STR_REASONS; i++) {
  ------------------
  |  |  196|    256|# define NUM_SYS_STR_REASONS 127
  ------------------
  |  Branch (225:17): [True: 254, False: 2]
  ------------------
  226|    254|        ERR_STRING_DATA *str = &SYS_str_reasons[i - 1];
  227|       |
  228|    254|        str->error = ERR_PACK(ERR_LIB_SYS, 0, i);
  ------------------
  |  |  138|    254|# define ERR_PACK(l,f,r) ( \
  |  |  139|    254|        (((unsigned int)(l) & 0x0FF) << 24L) | \
  |  |  140|    254|        (((unsigned int)(f) & 0xFFF) << 12L) | \
  |  |  141|    254|        (((unsigned int)(r) & 0xFFF)       ) )
  ------------------
  229|       |        /*
  230|       |         * If we have used up all the space in strerror_pool,
  231|       |         * there's no point in calling openssl_strerror_r()
  232|       |         */
  233|    254|        if (str->string == NULL && cnt < sizeof(strerror_pool)) {
  ------------------
  |  Branch (233:13): [True: 254, False: 0]
  |  Branch (233:36): [True: 254, False: 0]
  ------------------
  234|    254|            if (openssl_strerror_r(i, cur, sizeof(strerror_pool) - cnt)) {
  ------------------
  |  Branch (234:17): [True: 250, False: 4]
  ------------------
  235|    250|                size_t l = strlen(cur);
  236|       |
  237|    250|                str->string = cur;
  238|    250|                cnt += l;
  239|    250|                cur += l;
  240|       |
  241|       |                /*
  242|       |                 * VMS has an unusual quirk of adding spaces at the end of
  243|       |                 * some (most? all?) messages. Lets trim them off.
  244|       |                 */
  245|    250|                while (cur > strerror_pool && ossl_isspace(cur[-1])) {
  ------------------
  |  |   76|    250|# define ossl_isspace(c)        (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   27|    250|# define CTYPE_MASK_space       0x8
  |  |  ------------------
  |  |  |  Branch (76:33): [True: 0, False: 250]
  |  |  ------------------
  ------------------
  |  Branch (245:24): [True: 250, False: 0]
  ------------------
  246|      0|                    cur--;
  247|      0|                    cnt--;
  248|      0|                }
  249|    250|                *cur++ = '\0';
  250|    250|                cnt++;
  251|    250|            }
  252|    254|        }
  253|    254|        if (str->string == NULL)
  ------------------
  |  Branch (253:13): [True: 4, False: 250]
  ------------------
  254|      4|            str->string = "unknown";
  255|    254|    }
  256|       |
  257|       |    /*
  258|       |     * Now we still have SYS_str_reasons[NUM_SYS_STR_REASONS] = {0, NULL}, as
  259|       |     * required by ERR_load_strings.
  260|       |     */
  261|       |
  262|      2|    init = 0;
  263|       |
  264|      2|    CRYPTO_THREAD_unlock(err_string_lock);
  265|       |    /* openssl_strerror_r could change errno, but we want to preserve it */
  266|      2|    set_sys_error(saveerrno);
  ------------------
  |  |   77|      2|# define set_sys_error(e)        errno=(e)
  ------------------
  267|      2|    err_load_strings(SYS_str_reasons);
  268|      2|}
err.c:int_err_get_item:
  184|     58|{
  185|     58|    ERR_STRING_DATA *p = NULL;
  186|       |
  187|     58|    CRYPTO_THREAD_read_lock(err_string_lock);
  188|     58|    p = lh_ERR_STRING_DATA_retrieve(int_error_hash, d);
  189|     58|    CRYPTO_THREAD_unlock(err_string_lock);
  190|       |
  191|     58|    return p;
  192|     58|}
err.c:ERR_STATE_free:
  290|      2|{
  291|      2|    int i;
  292|       |
  293|      2|    if (s == NULL)
  ------------------
  |  Branch (293:9): [True: 0, False: 2]
  ------------------
  294|      0|        return;
  295|     34|    for (i = 0; i < ERR_NUM_ERRORS; i++) {
  ------------------
  |  |   42|     34|# define ERR_NUM_ERRORS  16
  ------------------
  |  Branch (295:17): [True: 32, False: 2]
  ------------------
  296|     32|        err_clear_data(s, i);
  ------------------
  |  |  272|     32|        do { \
  |  |  273|     32|            if ((p)->err_data_flags[i] & ERR_TXT_MALLOCED) {\
  |  |  ------------------
  |  |  |  |   36|     32|# define ERR_TXT_MALLOCED        0x01
  |  |  ------------------
  |  |  |  Branch (273:17): [True: 0, False: 32]
  |  |  ------------------
  |  |  274|      0|                OPENSSL_free((p)->err_data[i]); \
  |  |  ------------------
  |  |  |  |  128|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  275|      0|                (p)->err_data[i] = NULL; \
  |  |  276|      0|            } \
  |  |  277|     32|            (p)->err_data_flags[i] = 0; \
  |  |  278|     32|        } while (0)
  |  |  ------------------
  |  |  |  Branch (278:18): [Folded - Ignored]
  |  |  ------------------
  ------------------
  297|     32|    }
  298|      2|    OPENSSL_free(s);
  ------------------
  |  |  128|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      2|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      2|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  299|      2|}
err.c:err_do_init:
  742|      2|{
  743|      2|    set_err_thread_local = 1;
  744|      2|    return CRYPTO_THREAD_init_local(&err_thread_local, NULL);
  745|      2|}

err_load_crypto_strings_int:
   43|      2|{
   44|      2|    if (
   45|      2|#ifndef OPENSSL_NO_ERR
   46|      2|        ERR_load_ERR_strings() == 0 ||    /* include error strings for SYSerr */
  ------------------
  |  Branch (46:9): [True: 0, False: 2]
  ------------------
   47|      2|        ERR_load_BN_strings() == 0 ||
  ------------------
  |  Branch (47:9): [True: 0, False: 2]
  ------------------
   48|      2|# ifndef OPENSSL_NO_RSA
   49|      2|        ERR_load_RSA_strings() == 0 ||
  ------------------
  |  Branch (49:9): [True: 0, False: 2]
  ------------------
   50|      2|# endif
   51|      2|# ifndef OPENSSL_NO_DH
   52|      2|        ERR_load_DH_strings() == 0 ||
  ------------------
  |  Branch (52:9): [True: 0, False: 2]
  ------------------
   53|      2|# endif
   54|      2|        ERR_load_EVP_strings() == 0 ||
  ------------------
  |  Branch (54:9): [True: 0, False: 2]
  ------------------
   55|      2|        ERR_load_BUF_strings() == 0 ||
  ------------------
  |  Branch (55:9): [True: 0, False: 2]
  ------------------
   56|      2|        ERR_load_OBJ_strings() == 0 ||
  ------------------
  |  Branch (56:9): [True: 0, False: 2]
  ------------------
   57|      2|        ERR_load_PEM_strings() == 0 ||
  ------------------
  |  Branch (57:9): [True: 0, False: 2]
  ------------------
   58|      2|# ifndef OPENSSL_NO_DSA
   59|      2|        ERR_load_DSA_strings() == 0 ||
  ------------------
  |  Branch (59:9): [True: 0, False: 2]
  ------------------
   60|      2|# endif
   61|      2|        ERR_load_X509_strings() == 0 ||
  ------------------
  |  Branch (61:9): [True: 0, False: 2]
  ------------------
   62|      2|        ERR_load_ASN1_strings() == 0 ||
  ------------------
  |  Branch (62:9): [True: 0, False: 2]
  ------------------
   63|      2|        ERR_load_CONF_strings() == 0 ||
  ------------------
  |  Branch (63:9): [True: 0, False: 2]
  ------------------
   64|      2|        ERR_load_CRYPTO_strings() == 0 ||
  ------------------
  |  Branch (64:9): [True: 0, False: 2]
  ------------------
   65|      2|# ifndef OPENSSL_NO_COMP
   66|      2|        ERR_load_COMP_strings() == 0 ||
  ------------------
  |  Branch (66:9): [True: 0, False: 2]
  ------------------
   67|      2|# endif
   68|      2|# ifndef OPENSSL_NO_EC
   69|      2|        ERR_load_EC_strings() == 0 ||
  ------------------
  |  Branch (69:9): [True: 0, False: 2]
  ------------------
   70|      2|# endif
   71|       |        /* skip ERR_load_SSL_strings() because it is not in this library */
   72|      2|        ERR_load_BIO_strings() == 0 ||
  ------------------
  |  Branch (72:9): [True: 0, False: 2]
  ------------------
   73|      2|        ERR_load_PKCS7_strings() == 0 ||
  ------------------
  |  Branch (73:9): [True: 0, False: 2]
  ------------------
   74|      2|        ERR_load_X509V3_strings() == 0 ||
  ------------------
  |  Branch (74:9): [True: 0, False: 2]
  ------------------
   75|      2|        ERR_load_PKCS12_strings() == 0 ||
  ------------------
  |  Branch (75:9): [True: 0, False: 2]
  ------------------
   76|      2|        ERR_load_RAND_strings() == 0 ||
  ------------------
  |  Branch (76:9): [True: 0, False: 2]
  ------------------
   77|      2|        ERR_load_DSO_strings() == 0 ||
  ------------------
  |  Branch (77:9): [True: 0, False: 2]
  ------------------
   78|      2|# ifndef OPENSSL_NO_TS
   79|      2|        ERR_load_TS_strings() == 0 ||
  ------------------
  |  Branch (79:9): [True: 0, False: 2]
  ------------------
   80|      2|# endif
   81|      2|# ifndef OPENSSL_NO_ENGINE
   82|      2|        ERR_load_ENGINE_strings() == 0 ||
  ------------------
  |  Branch (82:9): [True: 0, False: 2]
  ------------------
   83|      2|# endif
   84|      2|# ifndef OPENSSL_NO_OCSP
   85|      2|        ERR_load_OCSP_strings() == 0 ||
  ------------------
  |  Branch (85:9): [True: 0, False: 2]
  ------------------
   86|      2|# endif
   87|      2|        ERR_load_UI_strings() == 0 ||
  ------------------
  |  Branch (87:9): [True: 0, False: 2]
  ------------------
   88|      2|# ifndef OPENSSL_NO_CMS
   89|      2|        ERR_load_CMS_strings() == 0 ||
  ------------------
  |  Branch (89:9): [True: 0, False: 2]
  ------------------
   90|      2|# endif
   91|      2|# ifndef OPENSSL_NO_CT
   92|      2|        ERR_load_CT_strings() == 0 ||
  ------------------
  |  Branch (92:9): [True: 0, False: 2]
  ------------------
   93|      2|# endif
   94|      2|        ERR_load_ASYNC_strings() == 0 ||
  ------------------
  |  Branch (94:9): [True: 0, False: 2]
  ------------------
   95|      2|#endif
   96|      2|        ERR_load_KDF_strings() == 0 ||
  ------------------
  |  Branch (96:9): [True: 0, False: 2]
  ------------------
   97|      2|        ERR_load_OSSL_STORE_strings() == 0)
  ------------------
  |  Branch (97:9): [True: 0, False: 2]
  ------------------
   98|      0|        return 0;
   99|       |
  100|      2|    return 1;
  101|      2|}

ERR_load_EVP_strings:
  287|      2|{
  288|      2|#ifndef OPENSSL_NO_ERR
  289|      2|    if (ERR_func_error_string(EVP_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (289:9): [True: 2, False: 0]
  ------------------
  290|      2|        ERR_load_strings_const(EVP_str_functs);
  291|      2|        ERR_load_strings_const(EVP_str_reasons);
  292|      2|    }
  293|      2|#endif
  294|      2|    return 1;
  295|      2|}

EVP_PBE_cleanup:
  244|      2|{
  245|      2|    sk_EVP_PBE_CTL_pop_free(pbe_algs, free_evp_pbe_ctl);
  246|      2|    pbe_algs = NULL;
  247|      2|}

evp_cleanup_int:
   81|      2|{
   82|      2|    OBJ_NAME_cleanup(OBJ_NAME_TYPE_CIPHER_METH);
  ------------------
  |  |   20|      2|# define OBJ_NAME_TYPE_CIPHER_METH       0x02
  ------------------
   83|      2|    OBJ_NAME_cleanup(OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   19|      2|# define OBJ_NAME_TYPE_MD_METH           0x01
  ------------------
   84|       |    /*
   85|       |     * The above calls will only clean out the contents of the name hash
   86|       |     * table, but not the hash table itself.  The following line does that
   87|       |     * part.  -- Richard Levitte
   88|       |     */
   89|      2|    OBJ_NAME_cleanup(-1);
   90|       |
   91|      2|    EVP_PBE_cleanup();
   92|      2|    OBJ_sigid_free();
   93|       |
   94|      2|    evp_app_cleanup_int();
   95|      2|}

evp_app_cleanup_int:
  317|      2|{
  318|      2|    if (app_pkey_methods != NULL)
  ------------------
  |  Branch (318:9): [True: 0, False: 2]
  ------------------
  319|      0|        sk_EVP_PKEY_METHOD_pop_free(app_pkey_methods, EVP_PKEY_meth_free);
  320|      2|}

crypto_cleanup_all_ex_data_int:
   94|      2|{
   95|      2|    int i;
   96|       |
   97|     34|    for (i = 0; i < CRYPTO_EX_INDEX__COUNT; ++i) {
  ------------------
  |  |  110|     34|# define CRYPTO_EX_INDEX__COUNT          16
  ------------------
  |  Branch (97:17): [True: 32, False: 2]
  ------------------
   98|     32|        EX_CALLBACKS *ip = &ex_data[i];
   99|       |
  100|     32|        sk_EX_CALLBACK_pop_free(ip->meth, cleanup_cb);
  101|     32|        ip->meth = NULL;
  102|     32|    }
  103|       |
  104|      2|    CRYPTO_THREAD_lock_free(ex_data_lock);
  105|      2|    ex_data_lock = NULL;
  106|      2|}

ossl_init_thread_start:
  458|      2|{
  459|      2|    struct thread_local_inits_st *locals;
  460|       |
  461|      2|    if (!OPENSSL_init_crypto(0, NULL))
  ------------------
  |  Branch (461:9): [True: 0, False: 2]
  ------------------
  462|      0|        return 0;
  463|       |
  464|      2|    locals = ossl_init_get_thread_local(1);
  465|       |
  466|      2|    if (locals == NULL)
  ------------------
  |  Branch (466:9): [True: 0, False: 2]
  ------------------
  467|      0|        return 0;
  468|       |
  469|      2|    if (opts & OPENSSL_INIT_THREAD_ASYNC) {
  ------------------
  |  |   31|      2|# define OPENSSL_INIT_THREAD_ASYNC           0x01
  ------------------
  |  Branch (469:9): [True: 0, False: 2]
  ------------------
  470|       |#ifdef OPENSSL_INIT_DEBUG
  471|       |        fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_start: "
  472|       |                        "marking thread for async\n");
  473|       |#endif
  474|      0|        locals->async = 1;
  475|      0|    }
  476|       |
  477|      2|    if (opts & OPENSSL_INIT_THREAD_ERR_STATE) {
  ------------------
  |  |   32|      2|# define OPENSSL_INIT_THREAD_ERR_STATE       0x02
  ------------------
  |  Branch (477:9): [True: 2, False: 0]
  ------------------
  478|       |#ifdef OPENSSL_INIT_DEBUG
  479|       |        fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_start: "
  480|       |                        "marking thread for err_state\n");
  481|       |#endif
  482|      2|        locals->err_state = 1;
  483|      2|    }
  484|       |
  485|      2|    if (opts & OPENSSL_INIT_THREAD_RAND) {
  ------------------
  |  |   33|      2|# define OPENSSL_INIT_THREAD_RAND            0x04
  ------------------
  |  Branch (485:9): [True: 0, False: 2]
  ------------------
  486|       |#ifdef OPENSSL_INIT_DEBUG
  487|       |        fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_start: "
  488|       |                        "marking thread for rand\n");
  489|       |#endif
  490|      0|        locals->rand = 1;
  491|      0|    }
  492|       |
  493|      2|    return 1;
  494|      2|}
OPENSSL_cleanup:
  497|      2|{
  498|      2|    OPENSSL_INIT_STOP *currhandler, *lasthandler;
  499|      2|    CRYPTO_THREAD_LOCAL key;
  500|       |
  501|       |    /* If we've not been inited then no need to deinit */
  502|      2|    if (!base_inited)
  ------------------
  |  Branch (502:9): [True: 0, False: 2]
  ------------------
  503|      0|        return;
  504|       |
  505|       |    /* Might be explicitly called and also by atexit */
  506|      2|    if (stopped)
  ------------------
  |  Branch (506:9): [True: 0, False: 2]
  ------------------
  507|      0|        return;
  508|      2|    stopped = 1;
  509|       |
  510|       |    /*
  511|       |     * Thread stop may not get automatically called by the thread library for
  512|       |     * the very last thread in some situations, so call it directly.
  513|       |     */
  514|      2|    ossl_init_thread_stop(ossl_init_get_thread_local(0));
  515|       |
  516|      2|    currhandler = stop_handlers;
  517|      2|    while (currhandler != NULL) {
  ------------------
  |  Branch (517:12): [True: 0, False: 2]
  ------------------
  518|      0|        currhandler->handler();
  519|      0|        lasthandler = currhandler;
  520|      0|        currhandler = currhandler->next;
  521|      0|        OPENSSL_free(lasthandler);
  ------------------
  |  |  128|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  522|      0|    }
  523|      2|    stop_handlers = NULL;
  524|       |
  525|      2|    CRYPTO_THREAD_lock_free(init_lock);
  526|      2|    init_lock = NULL;
  527|       |
  528|       |    /*
  529|       |     * We assume we are single-threaded for this function, i.e. no race
  530|       |     * conditions for the various "*_inited" vars below.
  531|       |     */
  532|       |
  533|      2|#ifndef OPENSSL_NO_COMP
  534|      2|    if (zlib_inited) {
  ------------------
  |  Branch (534:9): [True: 0, False: 2]
  ------------------
  535|       |#ifdef OPENSSL_INIT_DEBUG
  536|       |        fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
  537|       |                        "comp_zlib_cleanup_int()\n");
  538|       |#endif
  539|      0|        comp_zlib_cleanup_int();
  540|      0|    }
  541|      2|#endif
  542|       |
  543|      2|    if (async_inited) {
  ------------------
  |  Branch (543:9): [True: 0, False: 2]
  ------------------
  544|       |# ifdef OPENSSL_INIT_DEBUG
  545|       |        fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
  546|       |                        "async_deinit()\n");
  547|       |# endif
  548|      0|        async_deinit();
  549|      0|    }
  550|       |
  551|      2|    key = destructor_key.value;
  552|      2|    destructor_key.sane = -1;
  553|      2|    CRYPTO_THREAD_cleanup_local(&key);
  554|       |
  555|       |#ifdef OPENSSL_INIT_DEBUG
  556|       |    fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
  557|       |                    "rand_cleanup_int()\n");
  558|       |    fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
  559|       |                    "conf_modules_free_int()\n");
  560|       |#ifndef OPENSSL_NO_ENGINE
  561|       |    fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
  562|       |                    "engine_cleanup_int()\n");
  563|       |#endif
  564|       |    fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
  565|       |                    "crypto_cleanup_all_ex_data_int()\n");
  566|       |    fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
  567|       |                    "bio_sock_cleanup_int()\n");
  568|       |    fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
  569|       |                    "bio_cleanup()\n");
  570|       |    fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
  571|       |                    "evp_cleanup_int()\n");
  572|       |    fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
  573|       |                    "obj_cleanup_int()\n");
  574|       |    fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
  575|       |                    "err_cleanup()\n");
  576|       |#endif
  577|       |    /*
  578|       |     * Note that cleanup order is important:
  579|       |     * - rand_cleanup_int could call an ENGINE's RAND cleanup function so
  580|       |     * must be called before engine_cleanup_int()
  581|       |     * - ENGINEs use CRYPTO_EX_DATA and therefore, must be cleaned up
  582|       |     * before the ex data handlers are wiped in CRYPTO_cleanup_all_ex_data().
  583|       |     * - conf_modules_free_int() can end up in ENGINE code so must be called
  584|       |     * before engine_cleanup_int()
  585|       |     * - ENGINEs and additional EVP algorithms might use added OIDs names so
  586|       |     * obj_cleanup_int() must be called last
  587|       |     */
  588|      2|    rand_cleanup_int();
  589|      2|    rand_drbg_cleanup_int();
  590|      2|    conf_modules_free_int();
  591|      2|#ifndef OPENSSL_NO_ENGINE
  592|      2|    engine_cleanup_int();
  593|      2|#endif
  594|      2|    ossl_store_cleanup_int();
  595|      2|    crypto_cleanup_all_ex_data_int();
  596|      2|    bio_cleanup();
  597|      2|    evp_cleanup_int();
  598|      2|    obj_cleanup_int();
  599|      2|    err_cleanup();
  600|       |
  601|      2|    CRYPTO_secure_malloc_done();
  602|       |
  603|      2|    base_inited = 0;
  604|      2|}
OPENSSL_init_crypto:
  612|  2.75k|{
  613|  2.75k|    if (stopped) {
  ------------------
  |  Branch (613:9): [True: 0, False: 2.75k]
  ------------------
  614|      0|        if (!(opts & OPENSSL_INIT_BASE_ONLY))
  ------------------
  |  |   28|      0|# define OPENSSL_INIT_BASE_ONLY              0x00040000L
  ------------------
  |  Branch (614:13): [True: 0, False: 0]
  ------------------
  615|      0|            CRYPTOerr(CRYPTO_F_OPENSSL_INIT_CRYPTO, ERR_R_INIT_FAIL);
  ------------------
  |  |  113|      0|# define CRYPTOerr(f,r) ERR_PUT_error(ERR_LIB_CRYPTO,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |   29|      0|#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)
  |  |  ------------------
  ------------------
  616|      0|        return 0;
  617|      0|    }
  618|       |
  619|       |    /*
  620|       |     * When the caller specifies OPENSSL_INIT_BASE_ONLY, that should be the
  621|       |     * *only* option specified.  With that option we return immediately after
  622|       |     * doing the requested limited initialization.  Note that
  623|       |     * err_shelve_state() called by us via ossl_init_load_crypto_nodelete()
  624|       |     * re-enters OPENSSL_init_crypto() with OPENSSL_INIT_BASE_ONLY, but with
  625|       |     * base already initialized this is a harmless NOOP.
  626|       |     *
  627|       |     * If we remain the only caller of err_shelve_state() the recursion should
  628|       |     * perhaps be removed, but if in doubt, it can be left in place.
  629|       |     */
  630|  2.75k|    if (!RUN_ONCE(&base, ossl_init_base))
  ------------------
  |  |  119|  2.75k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 2.75k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (630:9): [True: 0, False: 2.75k]
  ------------------
  631|      0|        return 0;
  632|  2.75k|    if (opts & OPENSSL_INIT_BASE_ONLY)
  ------------------
  |  |   28|  2.75k|# define OPENSSL_INIT_BASE_ONLY              0x00040000L
  ------------------
  |  Branch (632:9): [True: 2.74k, False: 8]
  ------------------
  633|  2.74k|        return 1;
  634|       |
  635|       |    /*
  636|       |     * Now we don't always set up exit handlers, the INIT_BASE_ONLY calls
  637|       |     * should not have the side-effect of setting up exit handlers, and
  638|       |     * therefore, this code block is below the INIT_BASE_ONLY-conditioned early
  639|       |     * return above.
  640|       |     */
  641|      8|    if ((opts & OPENSSL_INIT_NO_ATEXIT) != 0) {
  ------------------
  |  |  375|      8|# define OPENSSL_INIT_NO_ATEXIT              0x00080000L
  ------------------
  |  Branch (641:9): [True: 0, False: 8]
  ------------------
  642|      0|        if (!RUN_ONCE_ALT(&register_atexit, ossl_init_no_register_atexit,
  ------------------
  |  |  137|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (137:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (642:13): [True: 0, False: 0]
  ------------------
  643|      0|                          ossl_init_register_atexit))
  644|      0|            return 0;
  645|      8|    } else if (!RUN_ONCE(&register_atexit, ossl_init_register_atexit)) {
  ------------------
  |  |  119|      8|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 8, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (645:16): [True: 0, False: 8]
  ------------------
  646|      0|        return 0;
  647|      0|    }
  648|       |
  649|      8|    if (!RUN_ONCE(&load_crypto_nodelete, ossl_init_load_crypto_nodelete))
  ------------------
  |  |  119|      8|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 8, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (649:9): [True: 0, False: 8]
  ------------------
  650|      0|        return 0;
  651|       |
  652|      8|    if ((opts & OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS)
  ------------------
  |  |  356|      8|# define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L
  ------------------
  |  Branch (652:9): [True: 0, False: 8]
  ------------------
  653|      8|            && !RUN_ONCE_ALT(&load_crypto_strings,
  ------------------
  |  |  137|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (137:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (653:16): [True: 0, False: 0]
  ------------------
  654|      8|                             ossl_init_no_load_crypto_strings,
  655|      8|                             ossl_init_load_crypto_strings))
  656|      0|        return 0;
  657|       |
  658|      8|    if ((opts & OPENSSL_INIT_LOAD_CRYPTO_STRINGS)
  ------------------
  |  |  357|      8|# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS    0x00000002L
  ------------------
  |  Branch (658:9): [True: 4, False: 4]
  ------------------
  659|      8|            && !RUN_ONCE(&load_crypto_strings, ossl_init_load_crypto_strings))
  ------------------
  |  |  119|      4|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 4, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (659:16): [True: 0, False: 4]
  ------------------
  660|      0|        return 0;
  661|       |
  662|      8|    if ((opts & OPENSSL_INIT_NO_ADD_ALL_CIPHERS)
  ------------------
  |  |  360|      8|# define OPENSSL_INIT_NO_ADD_ALL_CIPHERS     0x00000010L
  ------------------
  |  Branch (662:9): [True: 0, False: 8]
  ------------------
  663|      8|            && !RUN_ONCE_ALT(&add_all_ciphers, ossl_init_no_add_all_ciphers,
  ------------------
  |  |  137|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (137:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (663:16): [True: 0, False: 0]
  ------------------
  664|      8|                             ossl_init_add_all_ciphers))
  665|      0|        return 0;
  666|       |
  667|      8|    if ((opts & OPENSSL_INIT_ADD_ALL_CIPHERS)
  ------------------
  |  |  358|      8|# define OPENSSL_INIT_ADD_ALL_CIPHERS        0x00000004L
  ------------------
  |  Branch (667:9): [True: 0, False: 8]
  ------------------
  668|      8|            && !RUN_ONCE(&add_all_ciphers, ossl_init_add_all_ciphers))
  ------------------
  |  |  119|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (668:16): [True: 0, False: 0]
  ------------------
  669|      0|        return 0;
  670|       |
  671|      8|    if ((opts & OPENSSL_INIT_NO_ADD_ALL_DIGESTS)
  ------------------
  |  |  361|      8|# define OPENSSL_INIT_NO_ADD_ALL_DIGESTS     0x00000020L
  ------------------
  |  Branch (671:9): [True: 0, False: 8]
  ------------------
  672|      8|            && !RUN_ONCE_ALT(&add_all_digests, ossl_init_no_add_all_digests,
  ------------------
  |  |  137|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (137:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (672:16): [True: 0, False: 0]
  ------------------
  673|      8|                             ossl_init_add_all_digests))
  674|      0|        return 0;
  675|       |
  676|      8|    if ((opts & OPENSSL_INIT_ADD_ALL_DIGESTS)
  ------------------
  |  |  359|      8|# define OPENSSL_INIT_ADD_ALL_DIGESTS        0x00000008L
  ------------------
  |  Branch (676:9): [True: 0, False: 8]
  ------------------
  677|      8|            && !RUN_ONCE(&add_all_digests, ossl_init_add_all_digests))
  ------------------
  |  |  119|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (677:16): [True: 0, False: 0]
  ------------------
  678|      0|        return 0;
  679|       |
  680|      8|    if ((opts & OPENSSL_INIT_ATFORK)
  ------------------
  |  |  373|      8|# define OPENSSL_INIT_ATFORK                 0x00020000L
  ------------------
  |  Branch (680:9): [True: 0, False: 8]
  ------------------
  681|      8|            && !openssl_init_fork_handlers())
  ------------------
  |  Branch (681:16): [True: 0, False: 0]
  ------------------
  682|      0|        return 0;
  683|       |
  684|      8|    if ((opts & OPENSSL_INIT_NO_LOAD_CONFIG)
  ------------------
  |  |  363|      8|# define OPENSSL_INIT_NO_LOAD_CONFIG         0x00000080L
  ------------------
  |  Branch (684:9): [True: 0, False: 8]
  ------------------
  685|      8|            && !RUN_ONCE_ALT(&config, ossl_init_no_config, ossl_init_config))
  ------------------
  |  |  137|      0|    (CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (137:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (685:16): [True: 0, False: 0]
  ------------------
  686|      0|        return 0;
  687|       |
  688|      8|    if (opts & OPENSSL_INIT_LOAD_CONFIG) {
  ------------------
  |  |  362|      8|# define OPENSSL_INIT_LOAD_CONFIG            0x00000040L
  ------------------
  |  Branch (688:9): [True: 0, False: 8]
  ------------------
  689|      0|        int ret;
  690|      0|        CRYPTO_THREAD_write_lock(init_lock);
  691|      0|        conf_settings = settings;
  692|      0|        ret = RUN_ONCE(&config, ossl_init_config);
  ------------------
  |  |  119|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  693|      0|        conf_settings = NULL;
  694|      0|        CRYPTO_THREAD_unlock(init_lock);
  695|      0|        if (ret <= 0)
  ------------------
  |  Branch (695:13): [True: 0, False: 0]
  ------------------
  696|      0|            return 0;
  697|      0|    }
  698|       |
  699|      8|    if ((opts & OPENSSL_INIT_ASYNC)
  ------------------
  |  |  364|      8|# define OPENSSL_INIT_ASYNC                  0x00000100L
  ------------------
  |  Branch (699:9): [True: 0, False: 8]
  ------------------
  700|      8|            && !RUN_ONCE(&async, ossl_init_async))
  ------------------
  |  |  119|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (700:16): [True: 0, False: 0]
  ------------------
  701|      0|        return 0;
  702|       |
  703|      8|#ifndef OPENSSL_NO_ENGINE
  704|      8|    if ((opts & OPENSSL_INIT_ENGINE_OPENSSL)
  ------------------
  |  |  367|      8|# define OPENSSL_INIT_ENGINE_OPENSSL         0x00000800L
  ------------------
  |  Branch (704:9): [True: 0, False: 8]
  ------------------
  705|      8|            && !RUN_ONCE(&engine_openssl, ossl_init_engine_openssl))
  ------------------
  |  |  119|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (705:16): [True: 0, False: 0]
  ------------------
  706|      0|        return 0;
  707|       |# if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_DEVCRYPTOENG)
  708|       |    if ((opts & OPENSSL_INIT_ENGINE_CRYPTODEV)
  709|       |            && !RUN_ONCE(&engine_devcrypto, ossl_init_engine_devcrypto))
  710|       |        return 0;
  711|       |# endif
  712|      8|# ifndef OPENSSL_NO_RDRAND
  713|      8|    if ((opts & OPENSSL_INIT_ENGINE_RDRAND)
  ------------------
  |  |  365|      8|# define OPENSSL_INIT_ENGINE_RDRAND          0x00000200L
  ------------------
  |  Branch (713:9): [True: 0, False: 8]
  ------------------
  714|      8|            && !RUN_ONCE(&engine_rdrand, ossl_init_engine_rdrand))
  ------------------
  |  |  119|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (714:16): [True: 0, False: 0]
  ------------------
  715|      0|        return 0;
  716|      8|# endif
  717|      8|    if ((opts & OPENSSL_INIT_ENGINE_DYNAMIC)
  ------------------
  |  |  366|      8|# define OPENSSL_INIT_ENGINE_DYNAMIC         0x00000400L
  ------------------
  |  Branch (717:9): [True: 0, False: 8]
  ------------------
  718|      8|            && !RUN_ONCE(&engine_dynamic, ossl_init_engine_dynamic))
  ------------------
  |  |  119|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (718:16): [True: 0, False: 0]
  ------------------
  719|      0|        return 0;
  720|      8|# ifndef OPENSSL_NO_STATIC_ENGINE
  721|      8|#  if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_PADLOCK)
  722|      8|    if ((opts & OPENSSL_INIT_ENGINE_PADLOCK)
  ------------------
  |  |  370|      8|# define OPENSSL_INIT_ENGINE_PADLOCK         0x00004000L
  ------------------
  |  Branch (722:9): [True: 0, False: 8]
  ------------------
  723|      8|            && !RUN_ONCE(&engine_padlock, ossl_init_engine_padlock))
  ------------------
  |  |  119|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (723:16): [True: 0, False: 0]
  ------------------
  724|      0|        return 0;
  725|      8|#  endif
  726|       |#  if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
  727|       |    if ((opts & OPENSSL_INIT_ENGINE_CAPI)
  728|       |            && !RUN_ONCE(&engine_capi, ossl_init_engine_capi))
  729|       |        return 0;
  730|       |#  endif
  731|      8|#  if !defined(OPENSSL_NO_AFALGENG)
  732|      8|    if ((opts & OPENSSL_INIT_ENGINE_AFALG)
  ------------------
  |  |  371|      8|# define OPENSSL_INIT_ENGINE_AFALG           0x00008000L
  ------------------
  |  Branch (732:9): [True: 0, False: 8]
  ------------------
  733|      8|            && !RUN_ONCE(&engine_afalg, ossl_init_engine_afalg))
  ------------------
  |  |  119|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (733:16): [True: 0, False: 0]
  ------------------
  734|      0|        return 0;
  735|      8|#  endif
  736|      8|# endif
  737|      8|    if (opts & (OPENSSL_INIT_ENGINE_ALL_BUILTIN
  ------------------
  |  |  381|      8|    (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
  |  |  ------------------
  |  |  |  |  365|      8|# define OPENSSL_INIT_ENGINE_RDRAND          0x00000200L
  |  |  ------------------
  |  |                   (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
  |  |  ------------------
  |  |  |  |  366|      8|# define OPENSSL_INIT_ENGINE_DYNAMIC         0x00000400L
  |  |  ------------------
  |  |  382|      8|    | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | \
  |  |  ------------------
  |  |  |  |  368|      8|# define OPENSSL_INIT_ENGINE_CRYPTODEV       0x00001000L
  |  |  ------------------
  |  |                   | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | \
  |  |  ------------------
  |  |  |  |  369|      8|# define OPENSSL_INIT_ENGINE_CAPI            0x00002000L
  |  |  ------------------
  |  |  383|      8|    OPENSSL_INIT_ENGINE_PADLOCK)
  |  |  ------------------
  |  |  |  |  370|      8|# define OPENSSL_INIT_ENGINE_PADLOCK         0x00004000L
  |  |  ------------------
  ------------------
  |  Branch (737:9): [True: 0, False: 8]
  ------------------
  738|      8|                | OPENSSL_INIT_ENGINE_OPENSSL
  ------------------
  |  |  367|      8|# define OPENSSL_INIT_ENGINE_OPENSSL         0x00000800L
  ------------------
  739|      8|                | OPENSSL_INIT_ENGINE_AFALG)) {
  ------------------
  |  |  371|      8|# define OPENSSL_INIT_ENGINE_AFALG           0x00008000L
  ------------------
  740|      0|        ENGINE_register_all_complete();
  741|      0|    }
  742|      8|#endif
  743|       |
  744|      8|#ifndef OPENSSL_NO_COMP
  745|      8|    if ((opts & OPENSSL_INIT_ZLIB)
  ------------------
  |  |   27|      8|# define OPENSSL_INIT_ZLIB                   0x00010000L
  ------------------
  |  Branch (745:9): [True: 0, False: 8]
  ------------------
  746|      8|            && !RUN_ONCE(&zlib, ossl_init_zlib))
  ------------------
  |  |  119|      0|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (746:16): [True: 0, False: 0]
  ------------------
  747|      0|        return 0;
  748|      8|#endif
  749|       |
  750|      8|    return 1;
  751|      8|}
init.c:ossl_init_thread_stop:
  419|      2|{
  420|       |    /* Can't do much about this */
  421|      2|    if (locals == NULL)
  ------------------
  |  Branch (421:9): [True: 0, False: 2]
  ------------------
  422|      0|        return;
  423|       |
  424|      2|    if (locals->async) {
  ------------------
  |  Branch (424:9): [True: 0, False: 2]
  ------------------
  425|       |#ifdef OPENSSL_INIT_DEBUG
  426|       |        fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_stop: "
  427|       |                        "async_delete_thread_state()\n");
  428|       |#endif
  429|      0|        async_delete_thread_state();
  430|      0|    }
  431|       |
  432|      2|    if (locals->err_state) {
  ------------------
  |  Branch (432:9): [True: 2, False: 0]
  ------------------
  433|       |#ifdef OPENSSL_INIT_DEBUG
  434|       |        fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_stop: "
  435|       |                        "err_delete_thread_state()\n");
  436|       |#endif
  437|      2|        err_delete_thread_state();
  438|      2|    }
  439|       |
  440|      2|    if (locals->rand) {
  ------------------
  |  Branch (440:9): [True: 0, False: 2]
  ------------------
  441|       |#ifdef OPENSSL_INIT_DEBUG
  442|       |        fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_stop: "
  443|       |                        "drbg_delete_thread_state()\n");
  444|       |#endif
  445|      0|        drbg_delete_thread_state();
  446|      0|    }
  447|       |
  448|      2|    OPENSSL_free(locals);
  ------------------
  |  |  128|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      2|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      2|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  449|      2|}
init.c:ossl_init_get_thread_local:
   60|      4|{
   61|      4|    struct thread_local_inits_st *local =
   62|      4|        CRYPTO_THREAD_get_local(&destructor_key.value);
   63|       |
   64|      4|    if (alloc) {
  ------------------
  |  Branch (64:9): [True: 2, False: 2]
  ------------------
   65|      2|        if (local == NULL
  ------------------
  |  Branch (65:13): [True: 2, False: 0]
  ------------------
   66|      2|            && (local = OPENSSL_zalloc(sizeof(*local))) != NULL
  ------------------
  |  |  120|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      2|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      2|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (66:16): [True: 2, False: 0]
  ------------------
   67|      2|            && !CRYPTO_THREAD_set_local(&destructor_key.value, local)) {
  ------------------
  |  Branch (67:16): [True: 0, False: 2]
  ------------------
   68|      0|            OPENSSL_free(local);
  ------------------
  |  |  128|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   69|      0|            return NULL;
   70|      0|        }
   71|      2|    } else {
   72|      2|        CRYPTO_THREAD_set_local(&destructor_key.value, NULL);
   73|      2|    }
   74|       |
   75|      4|    return local;
   76|      4|}
init.c:ossl_init_base:
   90|      2|{
   91|      2|    CRYPTO_THREAD_LOCAL key;
   92|       |
   93|       |#ifdef OPENSSL_INIT_DEBUG
   94|       |    fprintf(stderr, "OPENSSL_INIT: ossl_init_base: Setting up stop handlers\n");
   95|       |#endif
   96|       |#ifndef OPENSSL_NO_CRYPTO_MDEBUG
   97|       |    ossl_malloc_setup_failures();
   98|       |#endif
   99|      2|    if (!CRYPTO_THREAD_init_local(&key, ossl_init_thread_destructor))
  ------------------
  |  Branch (99:9): [True: 0, False: 2]
  ------------------
  100|      0|        return 0;
  101|      2|    if ((init_lock = CRYPTO_THREAD_lock_new()) == NULL)
  ------------------
  |  Branch (101:9): [True: 0, False: 2]
  ------------------
  102|      0|        goto err;
  103|      2|    OPENSSL_cpuid_setup();
  104|       |
  105|      2|    destructor_key.value = key;
  106|      2|    base_inited = 1;
  107|      2|    return 1;
  108|       |
  109|      0|err:
  110|       |#ifdef OPENSSL_INIT_DEBUG
  111|       |    fprintf(stderr, "OPENSSL_INIT: ossl_init_base not ok!\n");
  112|       |#endif
  113|      0|    CRYPTO_THREAD_lock_free(init_lock);
  114|      0|    init_lock = NULL;
  115|       |
  116|      0|    CRYPTO_THREAD_cleanup_local(&key);
  117|      0|    return 0;
  118|      2|}
init.c:ossl_init_register_atexit:
  130|      2|{
  131|       |#ifdef OPENSSL_INIT_DEBUG
  132|       |    fprintf(stderr, "OPENSSL_INIT: ossl_init_register_atexit()\n");
  133|       |#endif
  134|      2|#ifndef OPENSSL_SYS_UEFI
  135|       |# ifdef _WIN32
  136|       |    /* We use _onexit() in preference because it gets called on DLL unload */
  137|       |    if (_onexit(win32atexit) == NULL)
  138|       |        return 0;
  139|       |# else
  140|      2|    if (atexit(OPENSSL_cleanup) != 0)
  ------------------
  |  Branch (140:9): [True: 0, False: 2]
  ------------------
  141|      0|        return 0;
  142|      2|# endif
  143|      2|#endif
  144|       |
  145|      2|    return 1;
  146|      2|}
init.c:ossl_init_load_crypto_nodelete:
  160|      2|{
  161|       |#ifdef OPENSSL_INIT_DEBUG
  162|       |    fprintf(stderr, "OPENSSL_INIT: ossl_init_load_crypto_nodelete()\n");
  163|       |#endif
  164|       |#if !defined(OPENSSL_USE_NODELETE) \
  165|       |    && !defined(OPENSSL_NO_PINSHARED)
  166|       |# if defined(DSO_WIN32) && !defined(_WIN32_WCE)
  167|       |    {
  168|       |        HMODULE handle = NULL;
  169|       |        BOOL ret;
  170|       |
  171|       |        /* We don't use the DSO route for WIN32 because there is a better way */
  172|       |        ret = GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
  173|       |                                | GET_MODULE_HANDLE_EX_FLAG_PIN,
  174|       |                                (void *)&base_inited, &handle);
  175|       |
  176|       |#  ifdef OPENSSL_INIT_DEBUG
  177|       |        fprintf(stderr, "OPENSSL_INIT: obtained DSO reference? %s\n",
  178|       |                (ret == TRUE ? "No!" : "Yes."));
  179|       |#  endif
  180|       |        return (ret == TRUE) ? 1 : 0;
  181|       |    }
  182|       |# elif !defined(DSO_NONE)
  183|       |    /*
  184|       |     * Deliberately leak a reference to ourselves. This will force the library
  185|       |     * to remain loaded until the atexit() handler is run at process exit.
  186|       |     */
  187|       |    {
  188|       |        DSO *dso;
  189|       |        void *err;
  190|       |
  191|       |        if (!err_shelve_state(&err))
  192|       |            return 0;
  193|       |
  194|       |        dso = DSO_dsobyaddr(&base_inited, DSO_FLAG_NO_UNLOAD_ON_FREE);
  195|       |#  ifdef OPENSSL_INIT_DEBUG
  196|       |        fprintf(stderr, "OPENSSL_INIT: obtained DSO reference? %s\n",
  197|       |                (dso == NULL ? "No!" : "Yes."));
  198|       |        /*
  199|       |         * In case of No!, it is uncertain our exit()-handlers can still be
  200|       |         * called. After dlclose() the whole library might have been unloaded
  201|       |         * already.
  202|       |         */
  203|       |#  endif
  204|       |        DSO_free(dso);
  205|       |        err_unshelve_state(err);
  206|       |    }
  207|       |# endif
  208|       |#endif
  209|       |
  210|      2|    return 1;
  211|      2|}
init.c:ossl_init_load_crypto_strings:
  216|      2|{
  217|      2|    int ret = 1;
  218|       |    /*
  219|       |     * OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time
  220|       |     * pulling in all the error strings during static linking
  221|       |     */
  222|      2|#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
  223|       |# ifdef OPENSSL_INIT_DEBUG
  224|       |    fprintf(stderr, "OPENSSL_INIT: ossl_init_load_crypto_strings: "
  225|       |                    "err_load_crypto_strings_int()\n");
  226|       |# endif
  227|      2|    ret = err_load_crypto_strings_int();
  228|      2|#endif
  229|      2|    return ret;
  230|      2|}

ERR_load_KDF_strings:
   59|      2|{
   60|      2|#ifndef OPENSSL_NO_ERR
   61|      2|    if (ERR_func_error_string(KDF_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (61:9): [True: 2, False: 0]
  ------------------
   62|      2|        ERR_load_strings_const(KDF_str_functs);
   63|      2|        ERR_load_strings_const(KDF_str_reasons);
   64|      2|    }
   65|      2|#endif
   66|      2|    return 1;
   67|      2|}

OPENSSL_LH_new:
   48|      2|{
   49|      2|    OPENSSL_LHASH *ret;
   50|       |
   51|      2|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
  ------------------
  |  |  120|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      2|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      2|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (51:9): [True: 0, False: 2]
  ------------------
   52|       |        /*
   53|       |         * Do not set the error code, because the ERR code uses LHASH
   54|       |         * and we want to avoid possible endless error loop.
   55|       |         * CRYPTOerr(CRYPTO_F_OPENSSL_LH_NEW, ERR_R_MALLOC_FAILURE);
   56|       |         */
   57|      0|        return NULL;
   58|      0|    }
   59|      2|    if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)
  ------------------
  |  |  120|      2|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      2|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      2|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (59:9): [True: 0, False: 2]
  ------------------
   60|      0|        goto err;
   61|      2|    ret->comp = ((c == NULL) ? (OPENSSL_LH_COMPFUNC)strcmp : c);
  ------------------
  |  Branch (61:18): [True: 0, False: 2]
  ------------------
   62|      2|    ret->hash = ((h == NULL) ? (OPENSSL_LH_HASHFUNC)OPENSSL_LH_strhash : h);
  ------------------
  |  Branch (62:18): [True: 0, False: 2]
  ------------------
   63|      2|    ret->num_nodes = MIN_NODES / 2;
  ------------------
  |  |   39|      2|#define MIN_NODES       16
  ------------------
   64|      2|    ret->num_alloc_nodes = MIN_NODES;
  ------------------
  |  |   39|      2|#define MIN_NODES       16
  ------------------
   65|      2|    ret->pmax = MIN_NODES / 2;
  ------------------
  |  |   39|      2|#define MIN_NODES       16
  ------------------
   66|      2|    ret->up_load = UP_LOAD;
  ------------------
  |  |   40|      2|#define UP_LOAD         (2*LH_LOAD_MULT) /* load times 256 (default 2) */
  |  |  ------------------
  |  |  |  |   70|      2|# define LH_LOAD_MULT    256
  |  |  ------------------
  ------------------
   67|      2|    ret->down_load = DOWN_LOAD;
  ------------------
  |  |   41|      2|#define DOWN_LOAD       (LH_LOAD_MULT) /* load times 256 (default 1) */
  |  |  ------------------
  |  |  |  |   70|      2|# define LH_LOAD_MULT    256
  |  |  ------------------
  ------------------
   68|      2|    return ret;
   69|       |
   70|      0|err:
   71|      0|    OPENSSL_free(ret->b);
  ------------------
  |  |  128|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   72|      0|    OPENSSL_free(ret);
  ------------------
  |  |  128|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   73|      0|    return NULL;
   74|      2|}
OPENSSL_LH_free:
   77|      4|{
   78|      4|    unsigned int i;
   79|      4|    OPENSSL_LH_NODE *n, *nn;
   80|       |
   81|      4|    if (lh == NULL)
  ------------------
  |  Branch (81:9): [True: 2, False: 2]
  ------------------
   82|      2|        return;
   83|       |
   84|  2.43k|    for (i = 0; i < lh->num_nodes; i++) {
  ------------------
  |  Branch (84:17): [True: 2.43k, False: 2]
  ------------------
   85|  2.43k|        n = lh->b[i];
   86|  7.30k|        while (n != NULL) {
  ------------------
  |  Branch (86:16): [True: 4.87k, False: 2.43k]
  ------------------
   87|  4.87k|            nn = n->next;
   88|  4.87k|            OPENSSL_free(n);
  ------------------
  |  |  128|  4.87k|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|  4.87k|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|  4.87k|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   89|  4.87k|            n = nn;
   90|  4.87k|        }
   91|  2.43k|    }
   92|      2|    OPENSSL_free(lh->b);
  ------------------
  |  |  128|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      2|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      2|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|      2|    OPENSSL_free(lh);
  ------------------
  |  |  128|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      2|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      2|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|      2|}
OPENSSL_LH_insert:
   97|  15.1k|{
   98|  15.1k|    unsigned long hash;
   99|  15.1k|    OPENSSL_LH_NODE *nn, **rn;
  100|  15.1k|    void *ret;
  101|       |
  102|  15.1k|    lh->error = 0;
  103|  15.1k|    if ((lh->up_load <= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)) && !expand(lh))
  ------------------
  |  |   70|  15.1k|# define LH_LOAD_MULT    256
  ------------------
  |  Branch (103:9): [True: 2.42k, False: 12.7k]
  |  Branch (103:76): [True: 0, False: 2.42k]
  ------------------
  104|      0|        return NULL;        /* 'lh->error++' already done in 'expand' */
  105|       |
  106|  15.1k|    rn = getrn(lh, data, &hash);
  107|       |
  108|  15.1k|    if (*rn == NULL) {
  ------------------
  |  Branch (108:9): [True: 4.87k, False: 10.3k]
  ------------------
  109|  4.87k|        if ((nn = OPENSSL_malloc(sizeof(*nn))) == NULL) {
  ------------------
  |  |  118|  4.87k|        CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|  4.87k|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|  4.87k|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (109:13): [True: 0, False: 4.87k]
  ------------------
  110|      0|            lh->error++;
  111|      0|            return NULL;
  112|      0|        }
  113|  4.87k|        nn->data = data;
  114|  4.87k|        nn->next = NULL;
  115|  4.87k|        nn->hash = hash;
  116|  4.87k|        *rn = nn;
  117|  4.87k|        ret = NULL;
  118|  4.87k|        lh->num_insert++;
  119|  4.87k|        lh->num_items++;
  120|  10.3k|    } else {                    /* replace same key */
  121|  10.3k|        ret = (*rn)->data;
  122|  10.3k|        (*rn)->data = data;
  123|  10.3k|        lh->num_replace++;
  124|  10.3k|    }
  125|  15.1k|    return ret;
  126|  15.1k|}
OPENSSL_LH_retrieve:
  157|     58|{
  158|     58|    unsigned long hash;
  159|     58|    OPENSSL_LH_NODE **rn;
  160|     58|    void *ret;
  161|       |
  162|     58|    tsan_store((TSAN_QUALIFIER int *)&lh->error, 0);
  ------------------
  |  |   58|     58|#  define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  163|       |
  164|     58|    rn = getrn(lh, data, &hash);
  165|       |
  166|     58|    if (*rn == NULL) {
  ------------------
  |  Branch (166:9): [True: 58, False: 0]
  ------------------
  167|     58|        tsan_counter(&lh->num_retrieve_miss);
  ------------------
  |  |   59|     58|#  define tsan_counter(ptr) atomic_fetch_add_explicit((ptr), 1, memory_order_relaxed)
  ------------------
  168|     58|        return NULL;
  169|     58|    } else {
  170|      0|        ret = (*rn)->data;
  171|      0|        tsan_counter(&lh->num_retrieve);
  ------------------
  |  |   59|      0|#  define tsan_counter(ptr) atomic_fetch_add_explicit((ptr), 1, memory_order_relaxed)
  ------------------
  172|      0|    }
  173|       |
  174|      0|    return ret;
  175|     58|}
OPENSSL_LH_num_items:
  378|      2|{
  379|      2|    return lh ? lh->num_items : 0;
  ------------------
  |  Branch (379:12): [True: 0, False: 2]
  ------------------
  380|      2|}
lhash.c:expand:
  215|  2.42k|{
  216|  2.42k|    OPENSSL_LH_NODE **n, **n1, **n2, *np;
  217|  2.42k|    unsigned int p, pmax, nni, j;
  218|  2.42k|    unsigned long hash;
  219|       |
  220|  2.42k|    nni = lh->num_alloc_nodes;
  221|  2.42k|    p = lh->p;
  222|  2.42k|    pmax = lh->pmax;
  223|  2.42k|    if (p + 1 >= pmax) {
  ------------------
  |  Branch (223:9): [True: 14, False: 2.40k]
  ------------------
  224|     14|        j = nni * 2;
  225|     14|        n = OPENSSL_realloc(lh->b, sizeof(OPENSSL_LH_NODE *) * j);
  ------------------
  |  |  122|     14|        CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|     14|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|     14|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  226|     14|        if (n == NULL) {
  ------------------
  |  Branch (226:13): [True: 0, False: 14]
  ------------------
  227|      0|            lh->error++;
  228|      0|            return 0;
  229|      0|        }
  230|     14|        lh->b = n;
  231|     14|        memset(n + nni, 0, sizeof(*n) * (j - nni));
  232|     14|        lh->pmax = nni;
  233|     14|        lh->num_alloc_nodes = j;
  234|     14|        lh->num_expand_reallocs++;
  235|     14|        lh->p = 0;
  236|  2.40k|    } else {
  237|  2.40k|        lh->p++;
  238|  2.40k|    }
  239|       |
  240|  2.42k|    lh->num_nodes++;
  241|  2.42k|    lh->num_expands++;
  242|  2.42k|    n1 = &(lh->b[p]);
  243|  2.42k|    n2 = &(lh->b[p + pmax]);
  244|  2.42k|    *n2 = NULL;
  245|       |
  246|  11.3k|    for (np = *n1; np != NULL;) {
  ------------------
  |  Branch (246:20): [True: 8.93k, False: 2.42k]
  ------------------
  247|  8.93k|        hash = np->hash;
  248|  8.93k|        if ((hash % nni) != p) { /* move it */
  ------------------
  |  Branch (248:13): [True: 704, False: 8.22k]
  ------------------
  249|    704|            *n1 = (*n1)->next;
  250|    704|            np->next = *n2;
  251|    704|            *n2 = np;
  252|    704|        } else
  253|  8.22k|            n1 = &((*n1)->next);
  254|  8.93k|        np = *n1;
  255|  8.93k|    }
  256|       |
  257|  2.42k|    return 1;
  258|  2.42k|}
lhash.c:getrn:
  297|  15.2k|{
  298|  15.2k|    OPENSSL_LH_NODE **ret, *n1;
  299|  15.2k|    unsigned long hash, nn;
  300|  15.2k|    OPENSSL_LH_COMPFUNC cf;
  301|       |
  302|  15.2k|    hash = (*(lh->hash)) (data);
  303|  15.2k|    tsan_counter(&lh->num_hash_calls);
  ------------------
  |  |   59|  15.2k|#  define tsan_counter(ptr) atomic_fetch_add_explicit((ptr), 1, memory_order_relaxed)
  ------------------
  304|  15.2k|    *rhash = hash;
  305|       |
  306|  15.2k|    nn = hash % lh->pmax;
  307|  15.2k|    if (nn < lh->p)
  ------------------
  |  Branch (307:9): [True: 8.94k, False: 6.30k]
  ------------------
  308|  8.94k|        nn = hash % lh->num_alloc_nodes;
  309|       |
  310|  15.2k|    cf = lh->comp;
  311|  15.2k|    ret = &(lh->b[(int)nn]);
  312|  44.6k|    for (n1 = *ret; n1 != NULL; n1 = n1->next) {
  ------------------
  |  Branch (312:21): [True: 39.6k, False: 4.92k]
  ------------------
  313|  39.6k|        tsan_counter(&lh->num_hash_comps);
  ------------------
  |  |   59|  39.6k|#  define tsan_counter(ptr) atomic_fetch_add_explicit((ptr), 1, memory_order_relaxed)
  ------------------
  314|  39.6k|        if (n1->hash != hash) {
  ------------------
  |  Branch (314:13): [True: 29.1k, False: 10.5k]
  ------------------
  315|  29.1k|            ret = &(n1->next);
  316|  29.1k|            continue;
  317|  29.1k|        }
  318|  39.6k|        tsan_counter(&lh->num_comp_calls);
  ------------------
  |  |   59|  39.6k|#  define tsan_counter(ptr) atomic_fetch_add_explicit((ptr), 1, memory_order_relaxed)
  ------------------
  319|  10.5k|        if (cf(n1->data, data) == 0)
  ------------------
  |  Branch (319:13): [True: 10.3k, False: 246]
  ------------------
  320|  10.3k|            break;
  321|    246|        ret = &(n1->next);
  322|    246|    }
  323|  15.2k|    return ret;
  324|  15.2k|}

CRYPTO_malloc:
  193|  5.58k|{
  194|  5.58k|    void *ret = NULL;
  195|       |
  196|  5.58k|    INCREMENT(malloc_count);
  197|  5.58k|    if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
  ------------------
  |  Branch (197:9): [True: 5.58k, False: 0]
  |  Branch (197:32): [True: 0, False: 5.58k]
  ------------------
  198|      0|        return malloc_impl(num, file, line);
  199|       |
  200|  5.58k|    if (num == 0)
  ------------------
  |  Branch (200:9): [True: 0, False: 5.58k]
  ------------------
  201|      0|        return NULL;
  202|       |
  203|  5.58k|    FAILTEST();
  204|  5.58k|    if (allow_customize) {
  ------------------
  |  Branch (204:9): [True: 2, False: 5.58k]
  ------------------
  205|       |        /*
  206|       |         * Disallow customization after the first allocation. We only set this
  207|       |         * if necessary to avoid a store to the same cache line on every
  208|       |         * allocation.
  209|       |         */
  210|      2|        allow_customize = 0;
  211|      2|    }
  212|       |#ifndef OPENSSL_NO_CRYPTO_MDEBUG
  213|       |    if (call_malloc_debug) {
  214|       |        CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);
  215|       |        ret = malloc(num);
  216|       |        CRYPTO_mem_debug_malloc(ret, num, 1, file, line);
  217|       |    } else {
  218|       |        ret = malloc(num);
  219|       |    }
  220|       |#else
  221|  5.58k|    (void)(file); (void)(line);
  222|  5.58k|    ret = malloc(num);
  223|  5.58k|#endif
  224|       |
  225|  5.58k|    return ret;
  226|  5.58k|}
CRYPTO_zalloc:
  229|    713|{
  230|    713|    void *ret = CRYPTO_malloc(num, file, line);
  231|       |
  232|    713|    FAILTEST();
  233|    713|    if (ret != NULL)
  ------------------
  |  Branch (233:9): [True: 713, False: 0]
  ------------------
  234|    713|        memset(ret, 0, num);
  235|    713|    return ret;
  236|    713|}
CRYPTO_realloc:
  239|     14|{
  240|     14|    INCREMENT(realloc_count);
  241|     14|    if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)
  ------------------
  |  Branch (241:9): [True: 14, False: 0]
  |  Branch (241:33): [True: 0, False: 14]
  ------------------
  242|      0|        return realloc_impl(str, num, file, line);
  243|       |
  244|     14|    FAILTEST();
  245|     14|    if (str == NULL)
  ------------------
  |  Branch (245:9): [True: 0, False: 14]
  ------------------
  246|      0|        return CRYPTO_malloc(num, file, line);
  247|       |
  248|     14|    if (num == 0) {
  ------------------
  |  Branch (248:9): [True: 0, False: 14]
  ------------------
  249|      0|        CRYPTO_free(str, file, line);
  250|      0|        return NULL;
  251|      0|    }
  252|       |
  253|       |#ifndef OPENSSL_NO_CRYPTO_MDEBUG
  254|       |    if (call_malloc_debug) {
  255|       |        void *ret;
  256|       |        CRYPTO_mem_debug_realloc(str, NULL, num, 0, file, line);
  257|       |        ret = realloc(str, num);
  258|       |        CRYPTO_mem_debug_realloc(str, ret, num, 1, file, line);
  259|       |        return ret;
  260|       |    }
  261|       |#else
  262|     14|    (void)(file); (void)(line);
  263|     14|#endif
  264|     14|    return realloc(str, num);
  265|       |
  266|     14|}
CRYPTO_free:
  296|  5.57k|{
  297|  5.57k|    INCREMENT(free_count);
  298|  5.57k|    if (free_impl != NULL && free_impl != &CRYPTO_free) {
  ------------------
  |  Branch (298:9): [True: 5.57k, False: 0]
  |  Branch (298:30): [True: 0, False: 5.57k]
  ------------------
  299|      0|        free_impl(str, file, line);
  300|      0|        return;
  301|      0|    }
  302|       |
  303|       |#ifndef OPENSSL_NO_CRYPTO_MDEBUG
  304|       |    if (call_malloc_debug) {
  305|       |        CRYPTO_mem_debug_free(str, 0, file, line);
  306|       |        free(str);
  307|       |        CRYPTO_mem_debug_free(str, 1, file, line);
  308|       |    } else {
  309|       |        free(str);
  310|       |    }
  311|       |#else
  312|  5.57k|    free(str);
  313|  5.57k|#endif
  314|  5.57k|}
CRYPTO_clear_free:
  317|    681|{
  318|    681|    if (str == NULL)
  ------------------
  |  Branch (318:9): [True: 0, False: 681]
  ------------------
  319|      0|        return;
  320|    681|    if (num)
  ------------------
  |  Branch (320:9): [True: 681, False: 0]
  ------------------
  321|    681|        OPENSSL_cleanse(str, num);
  322|    681|    CRYPTO_free(str, file, line);
  323|    681|}

CRYPTO_secure_malloc_done:
   98|      2|{
   99|      2|#ifdef OPENSSL_SECURE_MEMORY
  100|      2|    if (secure_mem_used == 0) {
  ------------------
  |  Branch (100:9): [True: 2, False: 0]
  ------------------
  101|      2|        sh_done();
  102|      2|        secure_mem_initialized = 0;
  103|      2|        CRYPTO_THREAD_lock_free(sec_malloc_lock);
  104|      2|        sec_malloc_lock = NULL;
  105|      2|        return 1;
  106|      2|    }
  107|      0|#endif /* OPENSSL_SECURE_MEMORY */
  108|      0|    return 0;
  109|      2|}
mem_sec.c:sh_done:
  507|      2|{
  508|      2|    OPENSSL_free(sh.freelist);
  ------------------
  |  |  128|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      2|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      2|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  509|      2|    OPENSSL_free(sh.bittable);
  ------------------
  |  |  128|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      2|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      2|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  510|      2|    OPENSSL_free(sh.bitmalloc);
  ------------------
  |  |  128|      2|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      2|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      2|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  511|      2|    if (sh.map_result != MAP_FAILED && sh.map_size)
  ------------------
  |  Branch (511:9): [True: 2, False: 0]
  |  Branch (511:40): [True: 0, False: 2]
  ------------------
  512|      0|        munmap(sh.map_result, sh.map_size);
  513|      2|    memset(&sh, 0, sizeof(sh));
  514|      2|}

openssl_strerror_r:
  222|    254|{
  223|       |#if defined(_MSC_VER) && _MSC_VER>=1400 && !defined(_WIN32_WCE)
  224|       |    return !strerror_s(buf, buflen, errnum);
  225|       |#elif defined(_GNU_SOURCE)
  226|       |    char *err;
  227|       |
  228|       |    /*
  229|       |     * GNU strerror_r may not actually set buf.
  230|       |     * It can return a pointer to some (immutable) static string in which case
  231|       |     * buf is left unused.
  232|       |     */
  233|       |    err = strerror_r(errnum, buf, buflen);
  234|       |    if (err == NULL || buflen == 0)
  235|       |        return 0;
  236|       |    /*
  237|       |     * If err is statically allocated, err != buf and we need to copy the data.
  238|       |     * If err points somewhere inside buf, OPENSSL_strlcpy can handle this,
  239|       |     * since src and dest are not annotated with __restrict and the function
  240|       |     * reads src byte for byte and writes to dest.
  241|       |     * If err == buf we do not have to copy anything.
  242|       |     */
  243|       |    if (err != buf)
  244|       |        OPENSSL_strlcpy(buf, err, buflen);
  245|       |    return 1;
  246|       |#elif (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \
  247|       |      (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)
  248|       |    /*
  249|       |     * We can use "real" strerror_r. The OpenSSL version differs in that it
  250|       |     * gives 1 on success and 0 on failure for consistency with other OpenSSL
  251|       |     * functions. Real strerror_r does it the other way around
  252|       |     */
  253|    254|    return !strerror_r(errnum, buf, buflen);
  254|       |#else
  255|       |    char *err;
  256|       |
  257|       |    /* Fall back to non-thread safe strerror()...its all we can do */
  258|       |    if (buflen < 2)
  259|       |        return 0;
  260|       |    err = strerror(errnum);
  261|       |    /* Can this ever happen? */
  262|       |    if (err == NULL)
  263|       |        return 0;
  264|       |    OPENSSL_strlcpy(buf, err, buflen);
  265|       |    return 1;
  266|       |#endif
  267|    254|}

OBJ_NAME_cleanup:
  390|      6|{
  391|      6|    unsigned long down_load;
  392|       |
  393|      6|    if (names_lh == NULL)
  ------------------
  |  Branch (393:9): [True: 6, False: 0]
  ------------------
  394|      6|        return;
  395|       |
  396|      0|    free_type = type;
  397|      0|    down_load = lh_OBJ_NAME_get_down_load(names_lh);
  398|      0|    lh_OBJ_NAME_set_down_load(names_lh, 0);
  399|       |
  400|      0|    lh_OBJ_NAME_doall(names_lh, names_lh_free_doall);
  401|      0|    if (type < 0) {
  ------------------
  |  Branch (401:9): [True: 0, False: 0]
  ------------------
  402|      0|        lh_OBJ_NAME_free(names_lh);
  403|      0|        sk_NAME_FUNCS_pop_free(name_funcs_stack, name_funcs_free);
  404|      0|        CRYPTO_THREAD_lock_free(obj_lock);
  405|      0|        names_lh = NULL;
  406|      0|        name_funcs_stack = NULL;
  407|      0|        obj_lock = NULL;
  408|      0|    } else
  409|      0|        lh_OBJ_NAME_set_down_load(names_lh, down_load);
  410|      0|}

obj_cleanup_int:
  154|      2|{
  155|      2|    if (added == NULL)
  ------------------
  |  Branch (155:9): [True: 2, False: 0]
  ------------------
  156|      2|        return;
  157|      0|    lh_ADDED_OBJ_set_down_load(added, 0);
  158|      0|    lh_ADDED_OBJ_doall(added, cleanup1_doall); /* zero counters */
  159|      0|    lh_ADDED_OBJ_doall(added, cleanup2_doall); /* set counters */
  160|      0|    lh_ADDED_OBJ_doall(added, cleanup3_doall); /* free objects */
  161|      0|    lh_ADDED_OBJ_free(added);
  162|      0|    added = NULL;
  163|      0|}

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

OBJ_sigid_free:
  134|      2|{
  135|      2|    sk_nid_triple_pop_free(sig_app, sid_free);
  136|      2|    sig_app = NULL;
  137|      2|    sk_nid_triple_free(sigx_app);
  138|      2|    sigx_app = NULL;
  139|      2|}

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

ERR_load_PEM_strings:
  122|      2|{
  123|      2|#ifndef OPENSSL_NO_ERR
  124|      2|    if (ERR_func_error_string(PEM_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (124:9): [True: 2, False: 0]
  ------------------
  125|      2|        ERR_load_strings_const(PEM_str_functs);
  126|      2|        ERR_load_strings_const(PEM_str_reasons);
  127|      2|    }
  128|      2|#endif
  129|      2|    return 1;
  130|      2|}

ERR_load_PKCS12_strings:
  109|      2|{
  110|      2|#ifndef OPENSSL_NO_ERR
  111|      2|    if (ERR_func_error_string(PKCS12_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (111:9): [True: 2, False: 0]
  ------------------
  112|      2|        ERR_load_strings_const(PKCS12_str_functs);
  113|      2|        ERR_load_strings_const(PKCS12_str_reasons);
  114|      2|    }
  115|      2|#endif
  116|      2|    return 1;
  117|      2|}

ERR_load_PKCS7_strings:
  148|      2|{
  149|      2|#ifndef OPENSSL_NO_ERR
  150|      2|    if (ERR_func_error_string(PKCS7_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (150:9): [True: 2, False: 0]
  ------------------
  151|      2|        ERR_load_strings_const(PKCS7_str_functs);
  152|      2|        ERR_load_strings_const(PKCS7_str_reasons);
  153|      2|    }
  154|      2|#endif
  155|      2|    return 1;
  156|      2|}

rand_drbg_cleanup_int:
  925|      2|{
  926|      2|    if (master_drbg != NULL) {
  ------------------
  |  Branch (926:9): [True: 0, False: 2]
  ------------------
  927|      0|        RAND_DRBG_free(master_drbg);
  928|      0|        master_drbg = NULL;
  929|       |
  930|      0|        CRYPTO_THREAD_cleanup_local(&private_drbg);
  931|      0|        CRYPTO_THREAD_cleanup_local(&public_drbg);
  932|      0|    }
  933|      2|}

ERR_load_RAND_strings:
  131|      2|{
  132|      2|#ifndef OPENSSL_NO_ERR
  133|      2|    if (ERR_func_error_string(RAND_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (133:9): [True: 2, False: 0]
  ------------------
  134|      2|        ERR_load_strings_const(RAND_str_functs);
  135|      2|        ERR_load_strings_const(RAND_str_reasons);
  136|      2|    }
  137|      2|#endif
  138|      2|    return 1;
  139|      2|}

rand_cleanup_int:
  345|      2|{
  346|      2|    const RAND_METHOD *meth = default_RAND_meth;
  347|       |
  348|      2|    if (!rand_inited)
  ------------------
  |  Branch (348:9): [True: 2, False: 0]
  ------------------
  349|      2|        return;
  350|       |
  351|      0|    if (meth != NULL && meth->cleanup != NULL)
  ------------------
  |  Branch (351:9): [True: 0, False: 0]
  |  Branch (351:25): [True: 0, False: 0]
  ------------------
  352|      0|        meth->cleanup();
  353|      0|    RAND_set_rand_method(NULL);
  354|      0|    rand_pool_cleanup();
  355|      0|#ifndef OPENSSL_NO_ENGINE
  356|      0|    CRYPTO_THREAD_lock_free(rand_engine_lock);
  357|      0|    rand_engine_lock = NULL;
  358|      0|#endif
  359|      0|    CRYPTO_THREAD_lock_free(rand_meth_lock);
  360|      0|    rand_meth_lock = NULL;
  361|      0|    CRYPTO_THREAD_lock_free(rand_nonce_lock);
  362|      0|    rand_nonce_lock = NULL;
  363|      0|    rand_inited = 0;
  364|      0|}

ERR_load_RSA_strings:
  240|      2|{
  241|      2|#ifndef OPENSSL_NO_ERR
  242|      2|    if (ERR_func_error_string(RSA_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (242:9): [True: 2, False: 0]
  ------------------
  243|      2|        ERR_load_strings_const(RSA_str_functs);
  244|      2|        ERR_load_strings_const(RSA_str_reasons);
  245|      2|    }
  246|      2|#endif
  247|      2|    return 1;
  248|      2|}

OPENSSL_sk_pop_free:
  361|     36|{
  362|     36|    int i;
  363|       |
  364|     36|    if (st == NULL)
  ------------------
  |  Branch (364:9): [True: 36, False: 0]
  ------------------
  365|     36|        return;
  366|      0|    for (i = 0; i < st->num; i++)
  ------------------
  |  Branch (366:17): [True: 0, False: 0]
  ------------------
  367|      0|        if (st->data[i] != NULL)
  ------------------
  |  Branch (367:13): [True: 0, False: 0]
  ------------------
  368|      0|            func((char *)st->data[i]);
  369|      0|    OPENSSL_sk_free(st);
  370|      0|}
OPENSSL_sk_free:
  373|      6|{
  374|      6|    if (st == NULL)
  ------------------
  |  Branch (374:9): [True: 6, False: 0]
  ------------------
  375|      6|        return;
  376|      0|    OPENSSL_free(st->data);
  ------------------
  |  |  128|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  377|      0|    OPENSSL_free(st);
  ------------------
  |  |  128|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  378|      0|}
OPENSSL_sk_num:
  381|      8|{
  382|      8|    return st == NULL ? -1 : st->num;
  ------------------
  |  Branch (382:12): [True: 8, False: 0]
  ------------------
  383|      8|}

ERR_load_OSSL_STORE_strings:
  138|      2|{
  139|      2|#ifndef OPENSSL_NO_ERR
  140|      2|    if (ERR_func_error_string(OSSL_STORE_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (140:9): [True: 2, False: 0]
  ------------------
  141|      2|        ERR_load_strings_const(OSSL_STORE_str_functs);
  142|      2|        ERR_load_strings_const(OSSL_STORE_str_reasons);
  143|      2|    }
  144|      2|#endif
  145|      2|    return 1;
  146|      2|}

ossl_store_cleanup_int:
   31|      2|{
   32|      2|    ossl_store_destroy_loaders_int();
   33|      2|}

ossl_store_destroy_loaders_int:
  278|      2|{
  279|      2|    assert(lh_OSSL_STORE_LOADER_num_items(loader_register) == 0);
  280|      2|    lh_OSSL_STORE_LOADER_free(loader_register);
  281|      2|    loader_register = NULL;
  282|      2|    CRYPTO_THREAD_lock_free(registry_lock);
  283|      2|    registry_lock = NULL;
  284|      2|}

CRYPTO_THREAD_lock_new:
   25|      4|{
   26|      4|# ifdef USE_RWLOCK
   27|      4|    CRYPTO_RWLOCK *lock;
   28|       |
   29|      4|    if ((lock = OPENSSL_zalloc(sizeof(pthread_rwlock_t))) == NULL) {
  ------------------
  |  |  120|      4|        CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      4|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      4|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (29:9): [True: 0, False: 4]
  ------------------
   30|       |        /* Don't set error, to avoid recursion blowup. */
   31|      0|        return NULL;
   32|      0|    }
   33|       |
   34|      4|    if (pthread_rwlock_init(lock, NULL) != 0) {
  ------------------
  |  Branch (34:9): [True: 0, False: 4]
  ------------------
   35|      0|        OPENSSL_free(lock);
  ------------------
  |  |  128|      0|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   36|      0|        return NULL;
   37|      0|    }
   38|       |# else
   39|       |    pthread_mutexattr_t attr;
   40|       |    CRYPTO_RWLOCK *lock;
   41|       |
   42|       |    if ((lock = OPENSSL_zalloc(sizeof(pthread_mutex_t))) == NULL) {
   43|       |        /* Don't set error, to avoid recursion blowup. */
   44|       |        return NULL;
   45|       |    }
   46|       |
   47|       |    pthread_mutexattr_init(&attr);
   48|       |    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
   49|       |
   50|       |    if (pthread_mutex_init(lock, &attr) != 0) {
   51|       |        pthread_mutexattr_destroy(&attr);
   52|       |        OPENSSL_free(lock);
   53|       |        return NULL;
   54|       |    }
   55|       |
   56|       |    pthread_mutexattr_destroy(&attr);
   57|       |# endif
   58|       |
   59|      4|    return lock;
   60|      4|}
CRYPTO_THREAD_read_lock:
   63|     58|{
   64|     58|# ifdef USE_RWLOCK
   65|     58|    if (pthread_rwlock_rdlock(lock) != 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 58]
  ------------------
   66|      0|        return 0;
   67|       |# else
   68|       |    if (pthread_mutex_lock(lock) != 0)
   69|       |        return 0;
   70|       |# endif
   71|       |
   72|     58|    return 1;
   73|     58|}
CRYPTO_THREAD_write_lock:
   76|    590|{
   77|    590|# ifdef USE_RWLOCK
   78|    590|    if (pthread_rwlock_wrlock(lock) != 0)
  ------------------
  |  Branch (78:9): [True: 0, False: 590]
  ------------------
   79|      0|        return 0;
   80|       |# else
   81|       |    if (pthread_mutex_lock(lock) != 0)
   82|       |        return 0;
   83|       |# endif
   84|       |
   85|    590|    return 1;
   86|    590|}
CRYPTO_THREAD_unlock:
   89|    648|{
   90|    648|# ifdef USE_RWLOCK
   91|    648|    if (pthread_rwlock_unlock(lock) != 0)
  ------------------
  |  Branch (91:9): [True: 0, False: 648]
  ------------------
   92|      0|        return 0;
   93|       |# else
   94|       |    if (pthread_mutex_unlock(lock) != 0)
   95|       |        return 0;
   96|       |# endif
   97|       |
   98|    648|    return 1;
   99|    648|}
CRYPTO_THREAD_lock_free:
  102|     16|{
  103|     16|    if (lock == NULL)
  ------------------
  |  Branch (103:9): [True: 12, False: 4]
  ------------------
  104|     12|        return;
  105|       |
  106|      4|# ifdef USE_RWLOCK
  107|      4|    pthread_rwlock_destroy(lock);
  108|       |# else
  109|       |    pthread_mutex_destroy(lock);
  110|       |# endif
  111|      4|    OPENSSL_free(lock);
  ------------------
  |  |  128|      4|        CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  109|      4|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  110|      4|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|       |
  113|      4|    return;
  114|     16|}
CRYPTO_THREAD_run_once:
  117|  5.69k|{
  118|  5.69k|    if (pthread_once(once, init) != 0)
  ------------------
  |  Branch (118:9): [True: 0, False: 5.69k]
  ------------------
  119|      0|        return 0;
  120|       |
  121|  5.69k|    return 1;
  122|  5.69k|}
CRYPTO_THREAD_init_local:
  125|      4|{
  126|      4|    if (pthread_key_create(key, cleanup) != 0)
  ------------------
  |  Branch (126:9): [True: 0, False: 4]
  ------------------
  127|      0|        return 0;
  128|       |
  129|      4|    return 1;
  130|      4|}
CRYPTO_THREAD_get_local:
  133|  2.75k|{
  134|  2.75k|    return pthread_getspecific(*key);
  135|  2.75k|}
CRYPTO_THREAD_set_local:
  138|     10|{
  139|     10|    if (pthread_setspecific(*key, val) != 0)
  ------------------
  |  Branch (139:9): [True: 0, False: 10]
  ------------------
  140|      0|        return 0;
  141|       |
  142|     10|    return 1;
  143|     10|}
CRYPTO_THREAD_cleanup_local:
  146|      4|{
  147|      4|    if (pthread_key_delete(*key) != 0)
  ------------------
  |  Branch (147:9): [True: 0, False: 4]
  ------------------
  148|      0|        return 0;
  149|       |
  150|      4|    return 1;
  151|      4|}

ERR_load_TS_strings:
  176|      2|{
  177|      2|#ifndef OPENSSL_NO_ERR
  178|      2|    if (ERR_func_error_string(TS_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (178:9): [True: 2, False: 0]
  ------------------
  179|      2|        ERR_load_strings_const(TS_str_functs);
  180|      2|        ERR_load_strings_const(TS_str_reasons);
  181|      2|    }
  182|      2|#endif
  183|      2|    return 1;
  184|      2|}

ERR_load_UI_strings:
   70|      2|{
   71|      2|#ifndef OPENSSL_NO_ERR
   72|      2|    if (ERR_func_error_string(UI_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (72:9): [True: 2, False: 0]
  ------------------
   73|      2|        ERR_load_strings_const(UI_str_functs);
   74|      2|        ERR_load_strings_const(UI_str_reasons);
   75|      2|    }
   76|      2|#endif
   77|      2|    return 1;
   78|      2|}

ERR_load_X509_strings:
  176|      2|{
  177|      2|#ifndef OPENSSL_NO_ERR
  178|      2|    if (ERR_func_error_string(X509_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (178:9): [True: 2, False: 0]
  ------------------
  179|      2|        ERR_load_strings_const(X509_str_functs);
  180|      2|        ERR_load_strings_const(X509_str_reasons);
  181|      2|    }
  182|      2|#endif
  183|      2|    return 1;
  184|      2|}

ERR_load_X509V3_strings:
  253|      2|{
  254|      2|#ifndef OPENSSL_NO_ERR
  255|      2|    if (ERR_func_error_string(X509V3_str_functs[0].error) == NULL) {
  ------------------
  |  Branch (255:9): [True: 2, False: 0]
  ------------------
  256|      2|        ERR_load_strings_const(X509V3_str_functs);
  257|      2|        ERR_load_strings_const(X509V3_str_reasons);
  258|      2|    }
  259|      2|#endif
  260|      2|    return 1;
  261|      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);
  ------------------
  |  |  357|      2|# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS    0x00000002L
  ------------------
   41|      2|    ERR_get_state();
   42|       |
   43|      2|    return 1;
   44|      2|}
FuzzerTestOneInput:
   47|  2.74k|{
   48|  2.74k|    int success = 0;
   49|  2.74k|    size_t l1 = 0, l2 = 0;
   50|       |    /* s1 and s2 will be the signs for b1 and b2. */
   51|  2.74k|    int s1 = 0, s2 = 0;
   52|       |
   53|       |    /* limit the size of the input to avoid timeout */
   54|  2.74k|    if (len > MAX_LEN)
  ------------------
  |  |   22|  2.74k|#define MAX_LEN (256 * 1000)
  ------------------
  |  Branch (54:9): [True: 1, False: 2.74k]
  ------------------
   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.74k|    if (len > 0) {
  ------------------
  |  Branch (60:9): [True: 2.74k, False: 0]
  ------------------
   61|  2.74k|        --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.74k|        l1 = ((buf[0] & 0x3f) * len) / 0x3f;
   67|  2.74k|        s1 = buf[0] & 0x40;
   68|  2.74k|        s2 = buf[0] & 0x80;
   69|  2.74k|        ++buf;
   70|  2.74k|        l2 = len - l1;
   71|  2.74k|    }
   72|  2.74k|    OPENSSL_assert(BN_bin2bn(buf, l1, b1) == b1);
  ------------------
  |  |  327|  2.74k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (327:12): [True: 2.74k, False: 0]
  |  |  ------------------
  ------------------
   73|  2.74k|    BN_set_negative(b1, s1);
   74|  2.74k|    OPENSSL_assert(BN_bin2bn(buf + l1, l2, b2) == b2);
  ------------------
  |  |  327|  2.74k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (327:12): [True: 2.74k, False: 0]
  |  |  ------------------
  ------------------
   75|  2.74k|    BN_set_negative(b2, s2);
   76|       |
   77|       |    /* divide by 0 is an error */
   78|  2.74k|    if (BN_is_zero(b2)) {
  ------------------
  |  Branch (78:9): [True: 17, False: 2.72k]
  ------------------
   79|     17|        success = 1;
   80|     17|        goto done;
   81|     17|    }
   82|       |
   83|  2.72k|    OPENSSL_assert(BN_div(b3, b4, b1, b2, ctx));
  ------------------
  |  |  327|  2.72k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (327:12): [True: 2.72k, False: 0]
  |  |  ------------------
  ------------------
   84|  2.72k|    if (BN_is_zero(b1))
  ------------------
  |  Branch (84:9): [True: 330, False: 2.39k]
  ------------------
   85|    330|        success = BN_is_zero(b3) && BN_is_zero(b4);
  ------------------
  |  Branch (85:19): [True: 330, False: 0]
  |  Branch (85:37): [True: 330, False: 0]
  ------------------
   86|  2.39k|    else if (BN_is_negative(b1))
  ------------------
  |  Branch (86:14): [True: 1.70k, False: 693]
  ------------------
   87|  1.70k|        success = (BN_is_negative(b3) != BN_is_negative(b2) || BN_is_zero(b3))
  ------------------
  |  Branch (87:20): [True: 1.63k, False: 63]
  |  Branch (87:64): [True: 63, False: 0]
  ------------------
   88|  1.70k|            && (BN_is_negative(b4) || BN_is_zero(b4));
  ------------------
  |  Branch (88:17): [True: 1.49k, False: 204]
  |  Branch (88:39): [True: 204, False: 0]
  ------------------
   89|    693|    else
   90|    693|        success = (BN_is_negative(b3) == BN_is_negative(b2)  || BN_is_zero(b3))
  ------------------
  |  Branch (90:20): [True: 680, False: 13]
  |  Branch (90:65): [True: 13, False: 0]
  ------------------
   91|    693|            && (!BN_is_negative(b4) || BN_is_zero(b4));
  ------------------
  |  Branch (91:17): [True: 693, False: 0]
  |  Branch (91:40): [True: 0, False: 0]
  ------------------
   92|  2.72k|    OPENSSL_assert(BN_mul(b5, b3, b2, ctx));
  ------------------
  |  |  327|  2.72k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (327:12): [True: 2.72k, False: 0]
  |  |  ------------------
  ------------------
   93|  2.72k|    OPENSSL_assert(BN_add(b5, b5, b4));
  ------------------
  |  |  327|  2.72k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (327:12): [True: 2.72k, False: 0]
  |  |  ------------------
  ------------------
   94|       |
   95|  2.72k|    success = success && BN_cmp(b5, b1) == 0;
  ------------------
  |  Branch (95:15): [True: 2.72k, False: 0]
  |  Branch (95:26): [True: 2.72k, False: 0]
  ------------------
   96|  2.72k|    if (!success) {
  ------------------
  |  Branch (96:9): [True: 0, False: 2.72k]
  ------------------
   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.74k| done:
  117|  2.74k|    OPENSSL_assert(success);
  ------------------
  |  |  327|  2.74k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  109|      0|#  define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  110|      0|#  define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (327:12): [True: 2.74k, False: 0]
  |  |  ------------------
  ------------------
  118|  2.74k|    ERR_clear_error();
  119|       |
  120|  2.74k|    return 0;
  121|  2.72k|}

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

err.c:do_err_strings_init_ossl_:
   62|      2|    {                                           \
   63|      2|        init##_ossl_ret_ = init();              \
   64|      2|    }                                           \
err.c:err_do_init_ossl_:
   62|      2|    {                                           \
   63|      2|        init##_ossl_ret_ = init();              \
   64|      2|    }                                           \
init.c:ossl_init_base_ossl_:
   62|      2|    {                                           \
   63|      2|        init##_ossl_ret_ = init();              \
   64|      2|    }                                           \
init.c:ossl_init_register_atexit_ossl_:
   62|      2|    {                                           \
   63|      2|        init##_ossl_ret_ = init();              \
   64|      2|    }                                           \
init.c:ossl_init_load_crypto_nodelete_ossl_:
   62|      2|    {                                           \
   63|      2|        init##_ossl_ret_ = init();              \
   64|      2|    }                                           \
init.c:ossl_init_load_crypto_strings_ossl_:
   62|      2|    {                                           \
   63|      2|        init##_ossl_ret_ = init();              \
   64|      2|    }                                           \

err.c:lh_ERR_STRING_DATA_free:
  130|      2|    { \
  131|      2|        OPENSSL_LH_free((OPENSSL_LHASH *)lh); \
  132|      2|    } \
err.c:lh_ERR_STRING_DATA_new:
  125|      2|    { \
  126|      2|        return (LHASH_OF(type) *) \
  127|      2|            OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn); \
  128|      2|    } \
err.c:lh_ERR_STRING_DATA_insert:
  134|  15.1k|    { \
  135|  15.1k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); \
  136|  15.1k|    } \
err.c:lh_ERR_STRING_DATA_retrieve:
  142|     58|    { \
  143|     58|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); \
  144|     58|    } \
store_register.c:lh_OSSL_STORE_LOADER_num_items:
  150|      2|    { \
  151|      2|        return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); \
  152|      2|    } \
store_register.c:lh_OSSL_STORE_LOADER_free:
  130|      2|    { \
  131|      2|        OPENSSL_LH_free((OPENSSL_LHASH *)lh); \
  132|      2|    } \

conf_mod.c:sk_CONF_MODULE_num:
   28|      4|    { \
   29|      4|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk); \
   30|      4|    } \
conf_mod.c:sk_CONF_IMODULE_num:
   28|      4|    { \
   29|      4|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk); \
   30|      4|    } \
conf_mod.c:sk_CONF_IMODULE_free:
   52|      4|    { \
   53|      4|        OPENSSL_sk_free((OPENSSL_STACK *)sk); \
   54|      4|    } \
ex_data.c:sk_EX_CALLBACK_pop_free:
   85|     32|    { \
   86|     32|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
   87|     32|    } \
obj_xref.c:sk_nid_triple_pop_free:
   85|      2|    { \
   86|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
   87|      2|    } \
obj_xref.c:sk_nid_triple_free:
   52|      2|    { \
   53|      2|        OPENSSL_sk_free((OPENSSL_STACK *)sk); \
   54|      2|    } \
evp_pbe.c:sk_EVP_PBE_CTL_pop_free:
   85|      2|    { \
   86|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
   87|      2|    } \

